1 {
2      File:       UTType.h
3 
4      Contains:   Public interfaces for uniform type identifiers
5 
6      Copyright:  (c) 2003-2012 by Apple Inc. All rights reserved.
7 
8      Bugs?:      For bug reports, consult the following page on
9                  the World Wide Web:
10 
11                      http://bugs.freepascal.org
12 }
13 
14 {
15     Modified for use with Free Pascal
16     Version 308
17     Please report any bugs to <gpc@microbizz.nl>
18 }
19 
20 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
21 {$mode macpas}
22 {$modeswitch cblocks}
23 {$packenum 1}
24 {$macro on}
25 {$inline on}
26 {$calling mwpascal}
27 
28 unit UTType;
29 interface
30 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
31 {$setc GAP_INTERFACES_VERSION := $0308}
32 
33 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
34     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
35 {$endc}
36 
37 {$ifc defined CPUPOWERPC and defined CPUI386}
38 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
39 {$endc}
40 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
41 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
42 {$endc}
43 
44 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
45 	{$setc __ppc__ := 1}
46 {$elsec}
47 	{$setc __ppc__ := 0}
48 {$endc}
49 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
50 	{$setc __ppc64__ := 1}
51 {$elsec}
52 	{$setc __ppc64__ := 0}
53 {$endc}
54 {$ifc not defined __i386__ and defined CPUI386}
55 	{$setc __i386__ := 1}
56 {$elsec}
57 	{$setc __i386__ := 0}
58 {$endc}
59 {$ifc not defined __x86_64__ and defined CPUX86_64}
60 	{$setc __x86_64__ := 1}
61 {$elsec}
62 	{$setc __x86_64__ := 0}
63 {$endc}
64 {$ifc not defined __arm__ and defined CPUARM}
65 	{$setc __arm__ := 1}
66 {$elsec}
67 	{$setc __arm__ := 0}
68 {$endc}
69 {$ifc not defined __arm64__ and defined CPUAARCH64}
70   {$setc __arm64__ := 1}
71 {$elsec}
72   {$setc __arm64__ := 0}
73 {$endc}
74 
75 {$ifc defined cpu64}
76   {$setc __LP64__ := 1}
77 {$elsec}
78   {$setc __LP64__ := 0}
79 {$endc}
80 
81 
82 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
83 	{$error Conflicting definitions for __ppc__ and __i386__}
84 {$endc}
85 
86 {$ifc defined __ppc__ and __ppc__}
87 	{$setc TARGET_CPU_PPC := TRUE}
88 	{$setc TARGET_CPU_PPC64 := FALSE}
89 	{$setc TARGET_CPU_X86 := FALSE}
90 	{$setc TARGET_CPU_X86_64 := FALSE}
91 	{$setc TARGET_CPU_ARM := FALSE}
92 	{$setc TARGET_CPU_ARM64 := FALSE}
93 	{$setc TARGET_OS_MAC := TRUE}
94 	{$setc TARGET_OS_IPHONE := FALSE}
95 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
96 	{$setc TARGET_OS_EMBEDDED := FALSE}
97 {$elifc defined __ppc64__ and __ppc64__}
98 	{$setc TARGET_CPU_PPC := FALSE}
99 	{$setc TARGET_CPU_PPC64 := TRUE}
100 	{$setc TARGET_CPU_X86 := FALSE}
101 	{$setc TARGET_CPU_X86_64 := FALSE}
102 	{$setc TARGET_CPU_ARM := FALSE}
103 	{$setc TARGET_CPU_ARM64 := FALSE}
104 	{$setc TARGET_OS_MAC := TRUE}
105 	{$setc TARGET_OS_IPHONE := FALSE}
106 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
107 	{$setc TARGET_OS_EMBEDDED := FALSE}
108 {$elifc defined __i386__ and __i386__}
109 	{$setc TARGET_CPU_PPC := FALSE}
110 	{$setc TARGET_CPU_PPC64 := FALSE}
111 	{$setc TARGET_CPU_X86 := TRUE}
112 	{$setc TARGET_CPU_X86_64 := FALSE}
113 	{$setc TARGET_CPU_ARM := FALSE}
114 	{$setc TARGET_CPU_ARM64 := FALSE}
115 {$ifc defined iphonesim}
116  	{$setc TARGET_OS_MAC := FALSE}
117 	{$setc TARGET_OS_IPHONE := TRUE}
118 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
119 {$elsec}
120 	{$setc TARGET_OS_MAC := TRUE}
121 	{$setc TARGET_OS_IPHONE := FALSE}
122 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
123 {$endc}
124 	{$setc TARGET_OS_EMBEDDED := FALSE}
125 {$elifc defined __x86_64__ and __x86_64__}
126 	{$setc TARGET_CPU_PPC := FALSE}
127 	{$setc TARGET_CPU_PPC64 := FALSE}
128 	{$setc TARGET_CPU_X86 := FALSE}
129 	{$setc TARGET_CPU_X86_64 := TRUE}
130 	{$setc TARGET_CPU_ARM := FALSE}
131 	{$setc TARGET_CPU_ARM64 := FALSE}
132 {$ifc defined iphonesim}
133  	{$setc TARGET_OS_MAC := FALSE}
134 	{$setc TARGET_OS_IPHONE := TRUE}
135 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
136 {$elsec}
137 	{$setc TARGET_OS_MAC := TRUE}
138 	{$setc TARGET_OS_IPHONE := FALSE}
139 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
140 {$endc}
141 	{$setc TARGET_OS_EMBEDDED := FALSE}
142 {$elifc defined __arm__ and __arm__}
143 	{$setc TARGET_CPU_PPC := FALSE}
144 	{$setc TARGET_CPU_PPC64 := FALSE}
145 	{$setc TARGET_CPU_X86 := FALSE}
146 	{$setc TARGET_CPU_X86_64 := FALSE}
147 	{$setc TARGET_CPU_ARM := TRUE}
148 	{$setc TARGET_CPU_ARM64 := FALSE}
149 	{$setc TARGET_OS_MAC := FALSE}
150 	{$setc TARGET_OS_IPHONE := TRUE}
151 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
152 	{$setc TARGET_OS_EMBEDDED := TRUE}
153 {$elifc defined __arm64__ and __arm64__}
154 	{$setc TARGET_CPU_PPC := FALSE}
155 	{$setc TARGET_CPU_PPC64 := FALSE}
156 	{$setc TARGET_CPU_X86 := FALSE}
157 	{$setc TARGET_CPU_X86_64 := FALSE}
158 	{$setc TARGET_CPU_ARM := FALSE}
159 	{$setc TARGET_CPU_ARM64 := TRUE}
160 {$ifc defined ios}
161 	{$setc TARGET_OS_MAC := FALSE}
162 	{$setc TARGET_OS_IPHONE := TRUE}
163 	{$setc TARGET_OS_EMBEDDED := TRUE}
164 {$elsec}
165 	{$setc TARGET_OS_MAC := TRUE}
166 	{$setc TARGET_OS_IPHONE := FALSE}
167 	{$setc TARGET_OS_EMBEDDED := FALSE}
168 {$endc}
169 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
170 {$elsec}
171 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
172 {$endc}
173 
174 {$ifc defined __LP64__ and __LP64__ }
175   {$setc TARGET_CPU_64 := TRUE}
176 {$elsec}
177   {$setc TARGET_CPU_64 := FALSE}
178 {$endc}
179 
180 {$ifc defined FPC_BIG_ENDIAN}
181 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
182 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
183 {$elifc defined FPC_LITTLE_ENDIAN}
184 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
185 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
186 {$elsec}
187 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
188 {$endc}
189 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
190 {$setc CALL_NOT_IN_CARBON := FALSE}
191 {$setc OLDROUTINENAMES := FALSE}
192 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
193 {$setc OPAQUE_UPP_TYPES := TRUE}
194 {$setc OTCARBONAPPLICATION := TRUE}
195 {$setc OTKERNEL := FALSE}
196 {$setc PM_USE_SESSION_APIS := TRUE}
197 {$setc TARGET_API_MAC_CARBON := TRUE}
198 {$setc TARGET_API_MAC_OS8 := FALSE}
199 {$setc TARGET_API_MAC_OSX := TRUE}
200 {$setc TARGET_CARBON := TRUE}
201 {$setc TARGET_CPU_68K := FALSE}
202 {$setc TARGET_CPU_MIPS := FALSE}
203 {$setc TARGET_CPU_SPARC := FALSE}
204 {$setc TARGET_OS_UNIX := FALSE}
205 {$setc TARGET_OS_WIN32 := FALSE}
206 {$setc TARGET_RT_MAC_68881 := FALSE}
207 {$setc TARGET_RT_MAC_CFM := FALSE}
208 {$setc TARGET_RT_MAC_MACHO := TRUE}
209 {$setc TYPED_FUNCTION_POINTERS := TRUE}
210 {$setc TYPE_BOOL := FALSE}
211 {$setc TYPE_EXTENDED := FALSE}
212 {$setc TYPE_LONGLONG := TRUE}
213 uses MacTypes,CFBase,CFArray,CFDictionary,CFURL;
214 {$endc} {not MACOSALLINCLUDE}
215 
216 
217 {$ALIGN POWER}
218 
219 
220 { ======================================================================================================== }
221 { Uniform Type Identification API                                                                          }
222 { ======================================================================================================== }
223 {
224     Uniform Type Identification Primer
225 
226     Uniform Type Identifiers (or UTIs) are strings which uniquely identify
227     abstract types. They can be used to describe a file format or an
228     in-memory data type, but can also be used to describe the type of
229     other sorts of entities, such as directories, volumes, or packages.
230 
231     The syntax of a uniform type identifier looks like a bundle identifier.
232     It has the form of a reversed DNS name, although some special top-level
233     UTI domains are reserved by Apple and are outside the current IANA
234     top-level Internet domain name space.
235 
236     Examples:
237 
238         public.jpeg
239         public.utf16-plain-text
240         com.apple.xml-property-list
241 
242     Types which are standard or not controlled by any one organization
243     are declared in the "public" domain. Currently, public types may
244     be declared only by Apple.
245 
246     Types specific to Mac OS are declared with identifiers in the
247     com.apple.macos domain.
248 
249     Third parties should declare their own uniform type identifiers
250     in their respective registered Internet domain spaces.
251 
252     Type declarations appear in bundle property lists and tell
253     the system several things about a type, including the following:
254 
255     Conformance
256 
257     A type may "conform" to one or more other types. For example, the
258     type com.apple.xml-property-list conforms to both the
259     com.apple.property-list and public.xml types. The public.xml
260     type in turn conforms to type public.text. Finally, type public.text
261     conforms to public.data, which is the base type for all types
262     describing bytes stream formats. Conformance relationships between
263     types are established in type declarations.
264 
265     Conformance relationships establish a multiple inheritanace hierarchy
266     between types. Type property values may be inherited at runtime
267     according to the conformance relationships for each type. When a type's
268     declaration does not include a value for particular type property,
269     then the type's supertypes are searched for a value. Supertypes are
270     searched depth-first, in the order given in the type declaration.
271     This is the only way in which the declared order of the conforms-to
272     supertypes is significant.
273 
274     Tags
275 
276     A "tag" is a string which indicates a type in some other type
277     identification space, such as a filename extension, MIME Type,
278     or NSPboardType. Each type declaration may include a
279     "tag specification", which is a dictionary listing all of the
280     tags associated with the type.
281 
282     A tag's "class" is the namespace of a tag: filename extension,
283     MIME type, OSType, etc. Tag classes are themselves identified by
284     uniform type identifiers so that the set of valid tag classes is
285     easily extendend in the future.
286 
287     Other Type Properties
288 
289     Type declarations may include several other properties: a localizable
290     user description of the type, the name of an icon resource in
291     the declaring bundle, a reference URL identifying technical
292     documentation about the type itself, and finally a version number,
293     which can be incremented as a type evolves. All of these properties
294     are optional.
295 
296     Exported vs. Imported Type Declarations
297 
298     Type declarations are either exported or imported. An exported
299     type declaration means that the type itself is defined or owned
300     by the organization making the declaration. For example, a propietary
301     document type declaration should only be exported by the application
302     which controls the document format.
303 
304     An imported declaration is for applications which depend on the
305     existence of someone else's type declaration. If application A can
306     open application B's document format, then application A makes
307     an imported declaration of application B's document type so that
308     even if application B is not present on the system, there is an
309     acessible declaration of its document type.
310 
311     An exported declaration of a particular type identifier is always
312     preferred over an imported declaration.
313 
314     Example XML Type Declaration
315 
316     Appearing below is an XML excerpt from a bundle Info.plist file which
317     declares the public type "public.jpeg":
318 
319         <key>UTExportedTypeDeclarations</key>
320         <array>
321             <dict>
322                 <key>UTTypeIdentifier</key>
323                 <string>public.jpeg</string>
324                 <key>UTTypeDescription</key>
325                 <string>JPEG image</string>
326                 <key>UTTypeIconFile</key>
327                 <string>public.jpeg.icns</string>
328                 <key>UTTypeConformsTo</key>
329                 <array>
330                     <string>public.image</string>
331                 </array>
332                 <key>UTTypeTagSpecification</key>
333                 <dict>
334                     <key>com.apple.ostype</key>
335                     <string>JPEG</string>
336                     <key>public.filename-extension</key>
337                     <array>
338                         <string>jpeg</string>
339                         <string>jpg</string>
340                     </array>
341                     <key>public.mime-type</key>
342                     <string>image/jpeg</string>
343                 </dict>
344             </dict>
345         </array>
346 
347 
348     Dynamic Type Identifiers
349 
350     Uniform Type Identifiation uses dynamic type identifiers to
351     represent types for which no identifier has been declared. A
352     dynamic type identifier is syntactially a regular uniform
353     type identifier in the "dyn" domain. However, after the
354     initial domain label, a dynamic type identifier is an
355     opaque encoding of a tag specification. Dynamic type
356     identifiers cannot be declared. They are generated on-demand
357     with whatever type information is available at the time, often
358     a single (otherwise unknown) type tag.
359 
360     A dynamic identifier therefore carries within it a minimal
361     amount of type information, but enough to work well with the
362     Uniform Type Identification API. For example, a client can
363     extract from a dynamic type identifier the original tag
364     specification with which it was created. A client can also
365     test a dynamic type identifier for equality to another
366     uniform type identifier. If the dynamic identifier's
367     tag specification is a subset of the other identifier's
368     tags, the two are considered equal.
369 
370     Dynamic type identifiers do not express the full richness
371     of type information associated with a declared type
372     identifier, but dynamic type identifiers allow the behavior
373     to degrade gracefully in the presence of incomplete
374     declared type information.
375 
376     A dynamic type identifier may be transmitted across processes
377     on a given system, but it should never be stored persistently
378     or transmitted over the wire to another system. In particular,
379     dynamic identifiers should not appear in bundle info property
380     lists, and they will generally be ignored when they do. Apple
381     reserves the right to change the opaque format of dynamic
382     identifiers in future versions of Mac OS X.
383 }
384 
385 {
386     Type Declaration Dictionary Keys
387 
388     The following keys are used in type declarations
389 }
390 {
391  *  kUTExportedTypeDeclarationsKey
392  }
393 var kUTExportedTypeDeclarationsKey: CFStringRef; external name '_kUTExportedTypeDeclarationsKey'; (* attribute const *)
394 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
395 {
396  *  kUTImportedTypeDeclarationsKey
397  }
398 var kUTImportedTypeDeclarationsKey: CFStringRef; external name '_kUTImportedTypeDeclarationsKey'; (* attribute const *)
399 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
400 {
401  *  kUTTypeIdentifierKey
402  }
403 var kUTTypeIdentifierKey: CFStringRef; external name '_kUTTypeIdentifierKey'; (* attribute const *)
404 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
405 {
406  *  kUTTypeTagSpecificationKey
407  }
408 var kUTTypeTagSpecificationKey: CFStringRef; external name '_kUTTypeTagSpecificationKey'; (* attribute const *)
409 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
410 {
411  *  kUTTypeConformsToKey
412  }
413 var kUTTypeConformsToKey: CFStringRef; external name '_kUTTypeConformsToKey'; (* attribute const *)
414 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
415 {
416  *  kUTTypeDescriptionKey
417  }
418 var kUTTypeDescriptionKey: CFStringRef; external name '_kUTTypeDescriptionKey'; (* attribute const *)
419 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
420 {
421  *  kUTTypeIconFileKey
422  }
423 var kUTTypeIconFileKey: CFStringRef; external name '_kUTTypeIconFileKey'; (* attribute const *)
424 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
425 {
426  *  kUTTypeReferenceURLKey
427  }
428 var kUTTypeReferenceURLKey: CFStringRef; external name '_kUTTypeReferenceURLKey'; (* attribute const *)
429 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
430 {
431  *  kUTTypeVersionKey
432  }
433 var kUTTypeVersionKey: CFStringRef; external name '_kUTTypeVersionKey'; (* attribute const *)
434 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
435 
436 
437 {
438     Type Tag Classes
439 
440     The following constant strings identify tag classes for use
441     when converting uniform type identifiers to and from
442     equivalent tags.
443 }
444 {
445  *  kUTTagClassFilenameExtension
446  }
447 var kUTTagClassFilenameExtension: CFStringRef; external name '_kUTTagClassFilenameExtension'; (* attribute const *)
448 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
449 {
450  *  kUTTagClassMIMEType
451  }
452 var kUTTagClassMIMEType: CFStringRef; external name '_kUTTagClassMIMEType'; (* attribute const *)
453 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
454 {
455  *  kUTTagClassNSPboardType
456  }
457 var kUTTagClassNSPboardType: CFStringRef; external name '_kUTTagClassNSPboardType'; (* attribute const *)
458 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA) *)
459 {
460  *  kUTTagClassOSType
461  }
462 var kUTTagClassOSType: CFStringRef; external name '_kUTTagClassOSType'; (* attribute const *)
463 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA) *)
464 
465 {
466  *  UTTypeCreatePreferredIdentifierForTag()
467  *
468  *  Discussion:
469  *    Creates a uniform type identifier for the type indicated by the
470  *    specified tag. This is the primary function to use for going from
471  *    tag (extension/MIMEType/OSType) to uniform type identifier.
472  *    Optionally, the returned type identifiers must conform to the
473  *    identified "conforming-to" type argument. This is a hint to the
474  *    implementation to constrain the search to a particular tree of
475  *    types. For example, the client may want to know the type
476  *    indicated by a particular extension tag. If the client knows that
477  *    the extension is associated with a directory (rather than a
478  *    file), the client may specify "public.directory" for the
479  *    conforming-to argument. This will allow the implementation to
480  *    ignore all types associated with byte data formats (public.data
481  *    base type). If more than one type is indicated, preference is
482  *    given to a public type over a non-public type on the theory that
483  *    instances of public types are more common, and therefore more
484  *    likely to be correct. When there a choice must be made between
485  *    multiple public types or multiple non-public types, the selection
486  *    rules are undefined. Clients needing finer control should use
487  *    UTTypeCreateAllIdentifiersForTag. If no declared type is
488  *    indicated, a dynamic type identifier is generated which satisfies
489  *    the parameters.
490  *
491  *  Mac OS X threading:
492  *    Thread safe since version 10.3
493  *
494  *  Parameters:
495  *
496  *    inTagClass:
497  *      the class identifier of the tag argument
498  *
499  *    inTag:
500  *      the tag string
501  *
502  *    inConformingToUTI:
503  *      the identifier of a type to which the result must conform
504  *
505  *  Result:
506  *    a new CFStringRef containing the type identifier, or NULL if
507  *    inTagClass is not a known tag class
508  }
UTTypeCreatePreferredIdentifierForTagnull509 function UTTypeCreatePreferredIdentifierForTag( inTagClass: CFStringRef; inTag: CFStringRef; inConformingToUTI: CFStringRef { can be NULL } ): CFStringRef; external name '_UTTypeCreatePreferredIdentifierForTag';
510 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
511 
512 
513 {
514  *  UTTypeCreateAllIdentifiersForTag()
515  *
516  *  Discussion:
517  *    Creates an array of all uniform type identifiers indicated by the
518  *    specified tag. An overloaded tag (e.g., an extension used by
519  *    several applications for different file formats) may indicate
520  *    multiple types. If no declared type identifiers have the
521  *    specified tag, then a single dynamic type identifier will be
522  *    created for the tag. Optionally, the returned type identifiers
523  *    must conform to the identified "conforming-to" type argument.
524  *    This is a hint to the implementation to constrain the search to a
525  *    particular tree of types. For example, the client may want to
526  *    know the type indicated by a particular extension tag. If the
527  *    client knows that the extension is associated with a directory
528  *    (rather than a file), the client may specify "public.directory"
529  *    for the conforming-to argument. This will allow the
530  *    implementation to ignore all types associated with byte data
531  *    formats (public.data base type).
532  *
533  *  Mac OS X threading:
534  *    Thread safe since version 10.3
535  *
536  *  Parameters:
537  *
538  *    inTagClass:
539  *      the class identifier of the tag argument
540  *
541  *    inTag:
542  *      the tag string
543  *
544  *    inConformingToUTI:
545  *      the identifier of a type to which the results must conform
546  *
547  *  Result:
548  *    An array of uniform type identifiers, or NULL if inTagClass is
549  *    not a known tag class
550  }
UTTypeCreateAllIdentifiersForTagnull551 function UTTypeCreateAllIdentifiersForTag( inTagClass: CFStringRef; inTag: CFStringRef; inConformingToUTI: CFStringRef { can be NULL } ): CFArrayRef; external name '_UTTypeCreateAllIdentifiersForTag';
552 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
553 
554 
555 {
556  *  UTTypeCopyPreferredTagWithClass()
557  *
558  *  Discussion:
559  *    Returns the identified type's preferred tag with the specified
560  *    tag class as a CFString. This is the primary function to use for
561  *    going from uniform type identifier to tag. If the type
562  *    declaration included more than one tag with the specified class,
563  *    the first tag in the declared tag array is the preferred tag.
564  *
565  *  Mac OS X threading:
566  *    Thread safe since version 10.3
567  *
568  *  Parameters:
569  *
570  *    inUTI:
571  *      the uniform type identifier
572  *
573  *    inTagClass:
574  *      the class of tags to return
575  *
576  *  Result:
577  *    the tag string, or NULL if there is no tag of the specified class.
578  }
UTTypeCopyPreferredTagWithClassnull579 function UTTypeCopyPreferredTagWithClass( inUTI: CFStringRef; inTagClass: CFStringRef ): CFStringRef; external name '_UTTypeCopyPreferredTagWithClass';
580 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
581 
582 
583 {
584  *  UTTypeEqual()
585  *
586  *  Discussion:
587  *    Compares two identified types for equality. Types are equal if
588  *    their identifier strings are equal using a case-insensitive
589  *    comparison. In addition, if one or both of the identifiers is a
590  *    dynamic identifier, then the types are equal if either
591  *    identifier's tag specification is a subset of the other
592  *    identifier's tag specification.
593  *
594  *  Mac OS X threading:
595  *    Thread safe since version 10.3
596  *
597  *  Parameters:
598  *
599  *    inUTI1:
600  *      a uniform type identifier
601  *
602  *    inUTI2:
603  *      another uniform type identifier
604  }
UTTypeEqualnull605 function UTTypeEqual( inUTI1: CFStringRef; inUTI2: CFStringRef ): Boolean; external name '_UTTypeEqual';
606 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
607 
608 
609 {
610  *  UTTypeConformsTo()
611  *
612  *  Discussion:
613  *    Tests for a conformance relationship between the two identified
614  *    types. Returns true if the types are equal, or if the first type
615  *    conforms, directly or indirectly, to the second type.
616  *
617  *  Mac OS X threading:
618  *    Thread safe since version 10.3
619  *
620  *  Parameters:
621  *
622  *    inUTI:
623  *      the uniform type identifier to test
624  *
625  *    inConformsToUTI:
626  *      the uniform type identifier against which to test conformance.
627  }
UTTypeConformsTonull628 function UTTypeConformsTo( inUTI: CFStringRef; inConformsToUTI: CFStringRef ): Boolean; external name '_UTTypeConformsTo';
629 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
630 
631 
632 {
633  *  UTTypeCopyDescription()
634  *
635  *  Discussion:
636  *    Returns the localized, user-readable type description string
637  *
638  *  Mac OS X threading:
639  *    Thread safe since version 10.3
640  *
641  *  Parameters:
642  *
643  *    inUTI:
644  *      the uniform type identifier
645  *
646  *  Result:
647  *    a localized string, or NULL of no type description is available
648  }
UTTypeCopyDescriptionnull649 function UTTypeCopyDescription( inUTI: CFStringRef ): CFStringRef; external name '_UTTypeCopyDescription';
650 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
651 
652 
653 {
654  *  UTTypeCopyDeclaration()
655  *
656  *  Discussion:
657  *    Returns the identified type's declaration dictionary, as it
658  *    appears in the declaring bundle's info property list. This the
659  *    access path to other type properties for which direct access is
660  *    rarely needed.
661  *
662  *  Mac OS X threading:
663  *    Thread safe since version 10.3
664  *
665  *  Parameters:
666  *
667  *    inUTI:
668  *      the uniform type identifier
669  *
670  *  Result:
671  *    a tag declaration dictionary, or NULL if the type is not declared
672  }
UTTypeCopyDeclarationnull673 function UTTypeCopyDeclaration( inUTI: CFStringRef ): CFDictionaryRef; external name '_UTTypeCopyDeclaration';
674 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
675 
676 
677 {
678  *  UTTypeCopyDeclaringBundleURL()
679  *
680  *  Discussion:
681  *    Returns the URL of the bundle containing the type declaration of
682  *    the identified type.
683  *
684  *  Mac OS X threading:
685  *    Thread safe since version 10.3
686  *
687  *  Parameters:
688  *
689  *    inUTI:
690  *      the uniform type identifier
691  *
692  *  Result:
693  *    a URL, or NULL if the bundle cannot be located.
694  }
UTTypeCopyDeclaringBundleURLnull695 function UTTypeCopyDeclaringBundleURL( inUTI: CFStringRef ): CFURLRef; external name '_UTTypeCopyDeclaringBundleURL';
696 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_3_0) *)
697 
698 
699 {
700  *  UTCreateStringForOSType()
701  *
702  *  Discussion:
703  *    A helper function to canonically encode an OSType as a CFString
704  *    suitable for use as a tag argument.
705  *
706  *  Mac OS X threading:
707  *    Thread safe since version 10.3
708  *
709  *  Parameters:
710  *
711  *    inOSType:
712  *      the OSType value to encode
713  *
714  *  Result:
715  *    a new CFString representing the OSType
716  }
UTCreateStringForOSTypenull717 function UTCreateStringForOSType( inOSType: OSType ): CFStringRef; external name '_UTCreateStringForOSType';
718 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA) *)
719 
720 
721 {
722  *  UTGetOSTypeFromString()
723  *
724  *  Discussion:
725  *    A helper function to canonically decode a string-encoded OSType
726  *    back to the original OSType value.
727  *
728  *  Mac OS X threading:
729  *    Thread safe since version 10.3
730  *
731  *  Parameters:
732  *
733  *    inString:
734  *      the string to decode
735  *
736  *  Result:
737  *    the OSType value encoded in the string, or 0 if the string is not
738  *    a valid encoding of an OSType
739  }
UTGetOSTypeFromStringnull740 function UTGetOSTypeFromString( inString: CFStringRef ): OSType; external name '_UTGetOSTypeFromString';
741 (* __OSX_AVAILABLE_STARTING(__MAC_10_3,__IPHONE_NA) *)
742 
743 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
744 
745 end.
746 {$endc} {not MACOSALLINCLUDE}
747