1 {
2      File:       ATS/ATSFont.h
3 
4      Contains:   Public interface to the font access and data management functions of ATS.
5 
6      Version:    ATS
7 
8      Copyright:  � 2000-2012 by Apple Inc., all rights reserved.
9 
10      Bugs?:      For bug reports, consult the following page on
11                  the World Wide Web:
12 
13                      http://bugs.freepascal.org
14 
15 }
16 
17 {  Pascal Translation Updated: Gorazd Krosl <gorazd_1957@yahoo.ca>, October 2009 }
18 {  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, October 2012 }
19 {
20     Modified for use with Free Pascal
21     Version 308
22     Please report any bugs to <gpc@microbizz.nl>
23 }
24 
25 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
26 {$mode macpas}
27 {$modeswitch cblocks}
28 {$packenum 1}
29 {$macro on}
30 {$inline on}
31 {$calling mwpascal}
32 
33 unit ATSFont;
34 interface
35 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
36 {$setc GAP_INTERFACES_VERSION := $0308}
37 
38 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
39     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
40 {$endc}
41 
42 {$ifc defined CPUPOWERPC and defined CPUI386}
43 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
44 {$endc}
45 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
46 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
47 {$endc}
48 
49 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
50 	{$setc __ppc__ := 1}
51 {$elsec}
52 	{$setc __ppc__ := 0}
53 {$endc}
54 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
55 	{$setc __ppc64__ := 1}
56 {$elsec}
57 	{$setc __ppc64__ := 0}
58 {$endc}
59 {$ifc not defined __i386__ and defined CPUI386}
60 	{$setc __i386__ := 1}
61 {$elsec}
62 	{$setc __i386__ := 0}
63 {$endc}
64 {$ifc not defined __x86_64__ and defined CPUX86_64}
65 	{$setc __x86_64__ := 1}
66 {$elsec}
67 	{$setc __x86_64__ := 0}
68 {$endc}
69 {$ifc not defined __arm__ and defined CPUARM}
70 	{$setc __arm__ := 1}
71 {$elsec}
72 	{$setc __arm__ := 0}
73 {$endc}
74 {$ifc not defined __arm64__ and defined CPUAARCH64}
75   {$setc __arm64__ := 1}
76 {$elsec}
77   {$setc __arm64__ := 0}
78 {$endc}
79 
80 {$ifc defined cpu64}
81   {$setc __LP64__ := 1}
82 {$elsec}
83   {$setc __LP64__ := 0}
84 {$endc}
85 
86 
87 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
88 	{$error Conflicting definitions for __ppc__ and __i386__}
89 {$endc}
90 
91 {$ifc defined __ppc__ and __ppc__}
92 	{$setc TARGET_CPU_PPC := TRUE}
93 	{$setc TARGET_CPU_PPC64 := FALSE}
94 	{$setc TARGET_CPU_X86 := FALSE}
95 	{$setc TARGET_CPU_X86_64 := FALSE}
96 	{$setc TARGET_CPU_ARM := FALSE}
97 	{$setc TARGET_CPU_ARM64 := FALSE}
98 	{$setc TARGET_OS_MAC := TRUE}
99 	{$setc TARGET_OS_IPHONE := FALSE}
100 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
101 	{$setc TARGET_OS_EMBEDDED := FALSE}
102 {$elifc defined __ppc64__ and __ppc64__}
103 	{$setc TARGET_CPU_PPC := FALSE}
104 	{$setc TARGET_CPU_PPC64 := TRUE}
105 	{$setc TARGET_CPU_X86 := FALSE}
106 	{$setc TARGET_CPU_X86_64 := FALSE}
107 	{$setc TARGET_CPU_ARM := FALSE}
108 	{$setc TARGET_CPU_ARM64 := FALSE}
109 	{$setc TARGET_OS_MAC := TRUE}
110 	{$setc TARGET_OS_IPHONE := FALSE}
111 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
112 	{$setc TARGET_OS_EMBEDDED := FALSE}
113 {$elifc defined __i386__ and __i386__}
114 	{$setc TARGET_CPU_PPC := FALSE}
115 	{$setc TARGET_CPU_PPC64 := FALSE}
116 	{$setc TARGET_CPU_X86 := TRUE}
117 	{$setc TARGET_CPU_X86_64 := FALSE}
118 	{$setc TARGET_CPU_ARM := FALSE}
119 	{$setc TARGET_CPU_ARM64 := FALSE}
120 {$ifc defined iphonesim}
121  	{$setc TARGET_OS_MAC := FALSE}
122 	{$setc TARGET_OS_IPHONE := TRUE}
123 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
124 {$elsec}
125 	{$setc TARGET_OS_MAC := TRUE}
126 	{$setc TARGET_OS_IPHONE := FALSE}
127 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
128 {$endc}
129 	{$setc TARGET_OS_EMBEDDED := FALSE}
130 {$elifc defined __x86_64__ and __x86_64__}
131 	{$setc TARGET_CPU_PPC := FALSE}
132 	{$setc TARGET_CPU_PPC64 := FALSE}
133 	{$setc TARGET_CPU_X86 := FALSE}
134 	{$setc TARGET_CPU_X86_64 := TRUE}
135 	{$setc TARGET_CPU_ARM := FALSE}
136 	{$setc TARGET_CPU_ARM64 := FALSE}
137 {$ifc defined iphonesim}
138  	{$setc TARGET_OS_MAC := FALSE}
139 	{$setc TARGET_OS_IPHONE := TRUE}
140 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
141 {$elsec}
142 	{$setc TARGET_OS_MAC := TRUE}
143 	{$setc TARGET_OS_IPHONE := FALSE}
144 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
145 {$endc}
146 	{$setc TARGET_OS_EMBEDDED := FALSE}
147 {$elifc defined __arm__ and __arm__}
148 	{$setc TARGET_CPU_PPC := FALSE}
149 	{$setc TARGET_CPU_PPC64 := FALSE}
150 	{$setc TARGET_CPU_X86 := FALSE}
151 	{$setc TARGET_CPU_X86_64 := FALSE}
152 	{$setc TARGET_CPU_ARM := TRUE}
153 	{$setc TARGET_CPU_ARM64 := FALSE}
154 	{$setc TARGET_OS_MAC := FALSE}
155 	{$setc TARGET_OS_IPHONE := TRUE}
156 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
157 	{$setc TARGET_OS_EMBEDDED := TRUE}
158 {$elifc defined __arm64__ and __arm64__}
159 	{$setc TARGET_CPU_PPC := FALSE}
160 	{$setc TARGET_CPU_PPC64 := FALSE}
161 	{$setc TARGET_CPU_X86 := FALSE}
162 	{$setc TARGET_CPU_X86_64 := FALSE}
163 	{$setc TARGET_CPU_ARM := FALSE}
164 	{$setc TARGET_CPU_ARM64 := TRUE}
165 {$ifc defined ios}
166 	{$setc TARGET_OS_MAC := FALSE}
167 	{$setc TARGET_OS_IPHONE := TRUE}
168 	{$setc TARGET_OS_EMBEDDED := TRUE}
169 {$elsec}
170 	{$setc TARGET_OS_MAC := TRUE}
171 	{$setc TARGET_OS_IPHONE := FALSE}
172 	{$setc TARGET_OS_EMBEDDED := FALSE}
173 {$endc}
174 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
175 {$elsec}
176 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
177 {$endc}
178 
179 {$ifc defined __LP64__ and __LP64__ }
180   {$setc TARGET_CPU_64 := TRUE}
181 {$elsec}
182   {$setc TARGET_CPU_64 := FALSE}
183 {$endc}
184 
185 {$ifc defined FPC_BIG_ENDIAN}
186 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
187 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
188 {$elifc defined FPC_LITTLE_ENDIAN}
189 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
190 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
191 {$elsec}
192 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
193 {$endc}
194 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
195 {$setc CALL_NOT_IN_CARBON := FALSE}
196 {$setc OLDROUTINENAMES := FALSE}
197 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
198 {$setc OPAQUE_UPP_TYPES := TRUE}
199 {$setc OTCARBONAPPLICATION := TRUE}
200 {$setc OTKERNEL := FALSE}
201 {$setc PM_USE_SESSION_APIS := TRUE}
202 {$setc TARGET_API_MAC_CARBON := TRUE}
203 {$setc TARGET_API_MAC_OS8 := FALSE}
204 {$setc TARGET_API_MAC_OSX := TRUE}
205 {$setc TARGET_CARBON := TRUE}
206 {$setc TARGET_CPU_68K := FALSE}
207 {$setc TARGET_CPU_MIPS := FALSE}
208 {$setc TARGET_CPU_SPARC := FALSE}
209 {$setc TARGET_OS_UNIX := FALSE}
210 {$setc TARGET_OS_WIN32 := FALSE}
211 {$setc TARGET_RT_MAC_68881 := FALSE}
212 {$setc TARGET_RT_MAC_CFM := FALSE}
213 {$setc TARGET_RT_MAC_MACHO := TRUE}
214 {$setc TYPED_FUNCTION_POINTERS := TRUE}
215 {$setc TYPE_BOOL := FALSE}
216 {$setc TYPE_EXTENDED := FALSE}
217 {$setc TYPE_LONGLONG := TRUE}
218 uses MacTypes,CFBase,CFRunLoop,CFPropertyList,ATSTypes,CFString,CFURL,Files,TextCommon,SFNTTypes;
219 {$endc} {not MACOSALLINCLUDE}
220 
221 
222 {$ifc TARGET_OS_MAC}
223 
224 {$ALIGN MAC68K}
225 
226 
227 const
228 	kATSOptionFlagsDefault = 0;
229 	kATSOptionFlagsComposeFontPostScriptName = 1 shl 0; { ATSFontGetPostScriptName }
230 	kATSOptionFlagsUseDataForkAsResourceFork = 1 shl 8; { ATSFontActivateFromFileSpecification }
231 	kATSOptionFlagsUseResourceFork = 2 shl 8;
232 	kATSOptionFlagsUseDataFork = 3 shl 8;
233 
234 	kATSIterationCompleted		= -980;
235 	kATSInvalidFontFamilyAccess	= -981;
236 	kATSInvalidFontAccess		= -982;
237 	kATSIterationScopeModified	= -983;
238 	kATSInvalidFontTableAccess	= -984;
239 	kATSInvalidFontContainerAccess = -985;
240     kATSInvalidGlyphAccess        = -986;
241 
242 
243 { Activation Option Flags }
244 type
245 	ATSFontContext = UInt32;
246 const
247 	kATSFontContextUnspecified = 0;
248 	kATSFontContextGlobal = 1;
249 	kATSFontContextLocal = 2;
250 
251 const
252 	kATSOptionFlagsActivateDisabled = $00000001 shl 5; { Used by activate to activate fonts in the disabled state }
253 	kATSOptionFlagsProcessSubdirectories = $00000001 shl 6; { Used by activation/deactivation & iteration }
254 	kATSOptionFlagsDoNotNotify = $00000001 shl 7; { Do not notify after global activation/deactivation }
255 	kATSOptionFlagsRecordPersistently = $00000001 shl 18; { Used by activated/deactivation to record/remove font references in persistent store to be remembered at next login }
256 
257 { Iteration Option Flags }
258 const
259 	kATSOptionFlagsIterateByPrecedenceMask = $00000001 shl 5; { Fonts returned from highest to lowest precedece }
260 	kATSOptionFlagsIncludeDisabledMask = $00000001 shl 7; { Disabled Fonts will show up in iteration, also valid for ATSFontFindFromContainer }
261 	kATSOptionFlagsIterationScopeMask = $00000007 shl 12; { Mask option bits 12-14 for iteration scopes }
262 	kATSOptionFlagsDefaultScope = $00000000 shl 12;
263 	kATSOptionFlagsUnRestrictedScope = $00000001 shl 12;
264 	kATSOptionFlagsRestrictedScope = $00000002 shl 12;
265 
266 type
267 	ATSFontFamilyApplierFunction = function( iFamily: ATSFontFamilyRef; iRefCon: UnivPtr ): OSStatus;
268 	ATSFontApplierFunction = function( iFont: ATSFontRef; iRefCon: UnivPtr ): OSStatus;
269 	ATSFontFamilyIterator_ = record end;
270 	ATSFontFamilyIterator = ^ATSFontFamilyIterator_;
271 	ATSFontIterator_ = record end;
272 	ATSFontIterator = ^ATSFontIterator_;
273 const
274 	kATSFontFilterCurrentVersion = 0;
275 
276 type
277 	ATSFontFilterSelector = SInt32;
278 const
279 	kATSFontFilterSelectorUnspecified = 0;
280 	kATSFontFilterSelectorGeneration = 3;
281 	kATSFontFilterSelectorFontFamily = 7;
282 	kATSFontFilterSelectorFontFamilyApplierFunction = 8;
283 	kATSFontFilterSelectorFontApplierFunction = 9;
284 	kATSFileReferenceFilterSelector = 10;
285 
286 type
287 	ATSFontFilterPtr = ^ATSFontFilter;
288 	ATSFontFilter = record
289 		version: UInt32;
290 		filterSelector: ATSFontFilterSelector;
291 		case SInt16 of
292 		0: (
293 			generationFilter:	ATSGeneration;
294 			);
295 		1: (
296 			fontFamilyFilter:	ATSFontFamilyRef;
297 			);
298 		2: (
299 			fontFamilyApplierFunctionFilter: ATSFontFamilyApplierFunction;
300 			);
301 		3: (
302 			fontApplierFunctionFilter: ATSFontApplierFunction;
303 			);
304 		4: (
305 			fontFileRefFilter: {const} FSRefPtr;
306 			);
307 	end;
308 { Notification related }
309 
310 	ATSFontNotificationRef_ = record end;
311 	ATSFontNotificationRef = ^ATSFontNotificationRef_;
312 	ATSFontNotificationRefPtr = ^ATSFontNotificationRef;
313 	ATSFontNotificationInfoRef_ = record end;
314 	ATSFontNotificationInfoRef = ^ATSFontNotificationInfoRef_;
315 	ATSFontNotificationInfoRefPtr = ^ATSFontNotificationInfoRef;
316 
317 {
318  *  ATSFontNotifyOption
319  *
320  *  Discussion:
321  *    Options used with ATSFontNotificationSubscribe.  Any of the
322  *    options that follow may be used together in order to alter the
323  *    default behavior of ATS notifications.
324  }
325 type
326 	ATSFontNotifyOption = SInt32;
327 const
328 {
329    * Default behavior of ATSFontNotificationSubscribe.
330    }
331 	kATSFontNotifyOptionDefault = 0;
332 
333   {
334    * Normally applications will only receive ATS notifications while in
335    * the foreground.   If suspended, the notification will be delivered
336    * when then application comes to the foreground.  This is the
337    * default.  You should set this option if you are a server or tool
338    * that performs font management functions and require immediate
339    * notification when something changes.
340    }
341 	kATSFontNotifyOptionReceiveWhileSuspended = 1 shl 0;
342 
343 
344 {
345  *  ATSFontNotifyAction
346  *
347  *  Discussion:
348  *    Used with ATSFontNotify.   The following is a list of actions you
349  *    might wish the ATS server to perform and notify clients if
350  *    appropriate.
351  }
352 type
353 	ATSFontNotifyAction = SInt32;
354 const
355 {
356    * Used after a batch (de)activation of fonts occurs.   Typically the
357    * caller has exercised multiple global (De)Activation calls with the
358    * kATSOptionFlagsDoNotNotify set. Once all calls are completed, one
359    * may use ATSFontNotify with this action to ask ATS to notify all
360    * clients.
361    }
362 	kATSFontNotifyActionFontsChanged = 1;
363 
364   {
365    * The ATS system with the help of the Finder keeps track of changes
366    * to any of the font directories in the system domains ( System,
367    * Local, Network, User, & Classic). However, one may wish to
368    * add/remove fonts to these locations programmatically. This action
369    * is used to let ATS server to rescan these directories and post
370    * notifications if necessary.
371    }
372 	kATSFontNotifyActionDirectoriesChanged = 2;
373 
374 
375 {
376  *  ATSNotificationCallback
377  *
378  *  Discussion:
379  *    Callback delivered for ATS notifications.
380  *
381  *  Parameters:
382  *
383  *    info:
384  *      Parameter is placed here for future improvements.  Initially
385  *      the contents of this parameter will be NULL.
386  *
387  *    refCon:
388  *      User data/state to be supplied to callback function
389  }
390 type
391 	ATSNotificationCallback = procedure( info: ATSFontNotificationInfoRef; refCon: UnivPtr );
392 { ----------------------------------------------------------------------------------------- }
393 { Font container                                                                            }
394 { ----------------------------------------------------------------------------------------- }
395 {
396  *  ATSGetGeneration()
397  *
398  *  Mac OS X threading:
399  *    Thread safe since version Jaguar
400  *
401  *  Availability:
402  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
403  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
404  *    Non-Carbon CFM:   not available
405  }
406 {
407   Register for kCTFontManagerRegisteredFontsChangedNotification notifications
408 }
ATSGetGenerationnull409 function ATSGetGeneration: ATSGeneration; external name '_ATSGetGeneration';
410 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
411 
412 
413 {$ifc not TARGET_CPU_64}
414 {
415  *  ATSFontActivateFromFileSpecification()   *** DEPRECATED ***
416  *
417  *  Deprecated:
418  *    Use ATSFontActivateFromFileReference instead.
419  *
420  *  Summary:
421  *    Activates one or more fonts from a file specification.
422  *
423  *  Mac OS X threading:
424  *    Thread safe since version Jaguar
425  *
426  *  Parameters:
427  *
428  *    iFile:
429  *      A pointer to the file specification that specifies the name and
430  *      location of a file or directory that contains the font data you
431  *      want to activate.
432  *
433  *    iContext:
434  *      A value that specifies the context of the activated font.
435  *
436  *    iFormat:
437  *      A value that represents the format identifier of the font. Pass
438  *      kATSFontFormatUnspecified as the system automatically
439  *      determines the format of the font.
440  *
441  *    iReserved:
442  *      This parameter is currently reserved for future use, so you
443  *      should pass NULL.
444  *
445  *    iOptions:
446  *      An options flag.  See developer documentation for appropriate
447  *      flags.
448  *
449  *    oContainer:
450  *      On output, a reference to the font container that is activated
451  *      from the file specification. You need this reference when you
452  *      deactivate the font by calling the function ATSFontDeactivate.
453  *
454  *  Result:
455  *    noErr Activated successfully
456  *
457  *  Availability:
458  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.5
459  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
460  *    Non-Carbon CFM:   not available
461  }
462 {
463   Use CTFontManagerRegisterFontsForURL() or CTFontManagerRegisterFontsForURLs()
464 }
ATSFontActivateFromFileSpecificationnull465 function ATSFontActivateFromFileSpecification( const (*var*) iFile: FSSpec; iContext: ATSFontContext; iFormat: ATSFontFormat; iReserved: UnivPtr; iOptions: ATSOptionFlags; var oContainer: ATSFontContainerRef ): OSStatus; external name '_ATSFontActivateFromFileSpecification';
466 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
467 
468 
469 {$endc}  { TARGET_CPU_64 }
470 
471 {
472  *  ATSFontActivateFromFileReference()
473  *
474  *  Summary:
475  *    Activates one or more fonts from a file reference.
476  *
477  *  Mac OS X threading:
478  *    Thread safe since version 10.5
479  *
480  *  Parameters:
481  *
482  *    iFile:
483  *      A pointer to the file specification that specifies the name and
484  *      location of a file or directory that contains the font data you
485  *      want to activate.
486  *
487  *    iContext:
488  *      A value that specifies the context of the activated font.
489  *
490  *    iFormat:
491  *      A value that represents the format identifier of the font. Pass
492  *      kATSFontFormatUnspecified as the system automatically
493  *      determines the format of the font.
494  *
495  *    iRefCon:
496  *      This parameter is currently reserved for future use, so you
497  *      should pass NULL.
498  *
499  *    iOptions:
500  *      An options flag.  See developer documentation for appropriate
501  *      flags.
502  *
503  *    oContainer:
504  *      On output, a reference to the font container that is activated
505  *      from the file specification. You need this reference when you
506  *      deactivate the font by calling the function ATSFontDeactivate.
507  *
508  *  Result:
509  *    noErr Activated successfully
510  *
511  *  Availability:
512  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
513  *    CarbonLib:        not available
514  *    Non-Carbon CFM:   not available
515  }
516 {
517    Use CTFontManagerRegisterFontsForURL() or CTFontManagerRegisterFontsForURLs()
518 }
ATSFontActivateFromFileReferencenull519 function ATSFontActivateFromFileReference( const (*var*) iFile: FSRef; iContext: ATSFontContext; iFormat: ATSFontFormat; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var oContainer: ATSFontContainerRef ): OSStatus; external name '_ATSFontActivateFromFileReference';
520 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
521 
522 
523 {
524  *  ATSFontActivateFromMemory()
525  *
526  *  Mac OS X threading:
527  *    Thread safe since version Jaguar
528  *
529  *  Availability:
530  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
531  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
532  *    Non-Carbon CFM:   not available
533  }
534 {
535   Use CTFontManagerRegisterFontForData() or CGFontCreateWithDataProvider() w/ CTFontManagerRegisterGraphicsFont()
536 }
ATSFontActivateFromMemorynull537 function ATSFontActivateFromMemory( iData: LogicalAddress; iLength: ByteCount; iContext: ATSFontContext; iFormat: ATSFontFormat; iReserved: UnivPtr; iOptions: ATSOptionFlags; var oContainer: ATSFontContainerRef ): OSStatus; external name '_ATSFontActivateFromMemory';
538 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
539 
540 
541 {
542  *  ATSFontDeactivate()
543  *
544  *  Mac OS X threading:
545  *    Thread safe since version Jaguar
546  *
547  *  Availability:
548  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
549  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
550  *    Non-Carbon CFM:   not available
551  }
552 { "Use CTFontManagerUnregisterFontsForURL() or CTFontManagerUnregisterFontsForURLs()" }
ATSFontDeactivatenull553 function ATSFontDeactivate( iContainer: ATSFontContainerRef; iRefCon: UnivPtr; iOptions: ATSOptionFlags ): OSStatus; external name '_ATSFontDeactivate';
554 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
555 
556 
557 {
558  *  ATSFontGetContainerFromFileReference()
559  *
560  *  Summary:
561  *    Get the font container reference associated with an activated
562  *    file reference.
563  *
564  *  Mac OS X threading:
565  *    Thread safe since version 10.5
566  *
567  *  Parameters:
568  *
569  *    iFile:
570  *      A pointer to the valid file reference that specificies the
571  *      activated font file for which to get the container.
572  *
573  *    iContext:
574  *      The context that the font file is accessible too. If
575  *      kATSFontContextGlobal is specified this function will return
576  *      only a valid font container reference that was activated in
577  *      kATSFontContextGlobal. If kATSFontContextDefault or
578  *      kATSFontContextLocal is used, the container returned will
579  *      adhere to precedence rules. In which case a container activated
580  *      in kATSFontContextLocal will be preferred over one activated in
581  *      kATSFontContextGlobal.
582  *
583  *    iOptions:
584  *      An options flag.  See developer documentation for appropriate
585  *      flags.
586  *
587  *    oContainer:
588  *      On output, a reference to the font container representing the
589  *      file reference activated in the specified context. On error or
590  *      for a file that is not activated, this will be set to
591  *      kATSFontContainerRefUnspecified.
592  *
593  *  Result:
594  *    paramErr One or more parameters are invalid.
595  *
596  *  Availability:
597  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
598  *    CarbonLib:        not available
599  *    Non-Carbon CFM:   not available
600  }
601 { "Use CTFontCopyAttribute() with kCTFontURLAttribute." }
ATSFontGetContainerFromFileReferencenull602 function ATSFontGetContainerFromFileReference( const (*var*) iFile: FSRef; iContext: ATSFontContext; iOptions: ATSOptionFlags; var oContainer: ATSFontContainerRef ): OSStatus; external name '_ATSFontGetContainerFromFileReference';
603 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
604 
605 
606 {
607  *  ATSFontGetContainer()
608  *
609  *  Summary:
610  *    Gets the font container reference for the font.
611  *
612  *  Mac OS X threading:
613  *    Thread safe since version 10.5
614  *
615  *  Parameters:
616  *
617  *    iFont:
618  *      The font reference.
619  *
620  *    iOptions:
621  *      An options flag.  See developer documentation for appropriate
622  *      flags.
623  *
624  *    oContainer:
625  *      On output, a reference to the font container that was used to
626  *      activate the font reference. On error this will be set to
627  *      kATSFontContainerRefUnspecified.
628  *
629  *  Result:
630  *    kATSInvalidFontContainerAccess The font container is invalid.
631  *
632  *  Availability:
633  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
634  *    CarbonLib:        not available
635  *    Non-Carbon CFM:   not available
636  }
637 { "Use CTFontCopyAttribute() with kCTFontURLAttribute." }
ATSFontGetContainernull638 function ATSFontGetContainer( iFont: ATSFontRef; iOptions: ATSOptionFlags; var oContainer: ATSFontContainerRef ): OSStatus; external name '_ATSFontGetContainer';
639 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
640 
641 
642 {
643  *  ATSFontSetEnabled()
644  *
645  *  Summary:
646  *    Sets a font's state to enabled or disabled.
647  *
648  *  Mac OS X threading:
649  *    Thread safe since version 10.5
650  *
651  *  Parameters:
652  *
653  *    iFont:
654  *      The font reference.
655  *
656  *    iOptions:
657  *      An options flag.  See developer documentation for appropriate
658  *      flags.
659  *
660  *    iEnabled:
661  *      The state to set the font to. True for enabled, false for
662  *      disabled.
663  *
664  *  Result:
665  *    kATSInvalidFontAccess The font reference is invalid in the
666  *    current application context.
667  *
668  *  Availability:
669  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
670  *    CarbonLib:        not available
671  *    Non-Carbon CFM:   not available
672  }
673 { "Use CTFontManagerEnableFontDescriptors()" }
ATSFontSetEnablednull674 function ATSFontSetEnabled( iFont: ATSFontRef; iOptions: ATSOptionFlags; iEnabled: Boolean ): OSStatus; external name '_ATSFontSetEnabled';
675 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
676 
677 
678 {
679  *  ATSFontIsEnabled()
680  *
681  *  Summary:
682  *    Returns true if the font is enabled.
683  *
684  *  Mac OS X threading:
685  *    Thread safe since version 10.5
686  *
687  *  Parameters:
688  *
689  *    iFont:
690  *      The font reference
691  *
692  *  Result:
693  *    false The font is disabled.
694  *
695  *  Availability:
696  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
697  *    CarbonLib:        not available
698  *    Non-Carbon CFM:   not available
699  }
700 { "Use CTFontCopyAttribute() with kCTFontEnabledAttribute" }
ATSFontIsEnablednull701 function ATSFontIsEnabled( iFont: ATSFontRef ): Boolean; external name '_ATSFontIsEnabled';
702 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
703 
704 { ----------------------------------------------------------------------------------------- }
705 { Font family                                                                               }
706 { ----------------------------------------------------------------------------------------- }
707 {
708  *  ATSFontFamilyApplyFunction()
709  *
710  *  Mac OS X threading:
711  *    Thread safe since version Jaguar
712  *
713  *  Availability:
714  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
715  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
716  *    Non-Carbon CFM:   not available
717  }
718 { "Use CTFontManagerCopyAvailableFontFamilyNames()" }
ATSFontFamilyApplyFunctionnull719 function ATSFontFamilyApplyFunction( iFunction: ATSFontFamilyApplierFunction; iRefCon: UnivPtr ): OSStatus; external name '_ATSFontFamilyApplyFunction';
720 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
721 
722 {
723  *  ATSFontFamilyIteratorCreate()
724  *
725  *  Mac OS X threading:
726  *    Thread safe since version Jaguar
727  *
728  *  Availability:
729  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
730  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
731  *    Non-Carbon CFM:   not available
732  }
733 { "Use CTFontManagerCopyAvailableFontFamilyNames()" }
ATSFontFamilyIteratorCreatenull734 function ATSFontFamilyIteratorCreate( iContext: ATSFontContext; {const} iFilter: ATSFontFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontFamilyIterator ): OSStatus; external name '_ATSFontFamilyIteratorCreate';
735 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
736 
737 {
738  *  ATSFontFamilyIteratorRelease()
739  *
740  *  Mac OS X threading:
741  *    Thread safe since version Jaguar
742  *
743  *  Availability:
744  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
745  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
746  *    Non-Carbon CFM:   not available
747  }
ATSFontFamilyIteratorReleasenull748 function ATSFontFamilyIteratorRelease( var ioIterator: ATSFontFamilyIterator ): OSStatus; external name '_ATSFontFamilyIteratorRelease';
749 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
750 
751 
752 {
753  *  ATSFontFamilyIteratorReset()
754  *
755  *  Mac OS X threading:
756  *    Thread safe since version Jaguar
757  *
758  *  Availability:
759  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
760  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
761  *    Non-Carbon CFM:   not available
762  }
ATSFontFamilyIteratorResetnull763 function ATSFontFamilyIteratorReset( iContext: ATSFontContext; {const} iFilter: ATSFontFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontFamilyIterator ): OSStatus; external name '_ATSFontFamilyIteratorReset';
764 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
765 
766 
767 {
768  *  ATSFontFamilyIteratorNext()
769  *
770  *  Mac OS X threading:
771  *    Thread safe since version Jaguar
772  *
773  *  Availability:
774  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
775  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
776  *    Non-Carbon CFM:   not available
777  }
ATSFontFamilyIteratorNextnull778 function ATSFontFamilyIteratorNext( iIterator: ATSFontFamilyIterator; var oFamily: ATSFontFamilyRef ): OSStatus; external name '_ATSFontFamilyIteratorNext';
779 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
780 
781 
782 {
783  *  ATSFontFamilyFindFromName()
784  *
785  *  Mac OS X threading:
786  *    Thread safe since version Jaguar
787  *
788  *  Availability:
789  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
790  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
791  *    Non-Carbon CFM:   not available
792  }
793 { "Use CTFontDescriptorCreateMatchingFontDescriptors() with kCTFontFamilyNameAttribute" }
ATSFontFamilyFindFromNamenull794 function ATSFontFamilyFindFromName( iName: CFStringRef; iOptions: ATSOptionFlags ): ATSFontFamilyRef; external name '_ATSFontFamilyFindFromName';
795 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
796 
797 {
798  *  ATSFontFamilyGetGeneration()
799  *
800  *  Mac OS X threading:
801  *    Thread safe since version Jaguar
802  *
803  *  Availability:
804  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
805  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
806  *    Non-Carbon CFM:   not available
807  }
808 { "Register for kCTFontManagerRegisteredFontsChangedNotification notifications" }
ATSFontFamilyGetGenerationnull809 function ATSFontFamilyGetGeneration( iFamily: ATSFontFamilyRef ): ATSGeneration; external name '_ATSFontFamilyGetGeneration';
810 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
811 
812 {
813  *  ATSFontFamilyGetName()
814  *
815  *  Mac OS X threading:
816  *    Thread safe since version Jaguar
817  *
818  *  Availability:
819  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
820  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
821  *    Non-Carbon CFM:   not available
822  }
823 { "Use CTFontCopyFamilyName()" }
ATSFontFamilyGetNamenull824 function ATSFontFamilyGetName( iFamily: ATSFontFamilyRef; iOptions: ATSOptionFlags; var oName: CFStringRef ): OSStatus; external name '_ATSFontFamilyGetName';
825 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
826 
827 {
828  *  ATSFontFamilyGetEncoding()
829  *
830  *  Mac OS X threading:
831  *    Thread safe since version Jaguar
832  *
833  *  Availability:
834  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
835  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
836  *    Non-Carbon CFM:   not available
837  }
838 { "Use CTFontGetStringEncoding()" }
ATSFontFamilyGetEncodingnull839 function ATSFontFamilyGetEncoding( iFamily: ATSFontFamilyRef ): TextEncoding; external name '_ATSFontFamilyGetEncoding';
840 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
841 
842 { ----------------------------------------------------------------------------------------- }
843 { Font                                                                                      }
844 { ----------------------------------------------------------------------------------------- }
845 {
846  *  ATSFontApplyFunction()
847  *
848  *  Mac OS X threading:
849  *    Thread safe since version Jaguar
850  *
851  *  Availability:
852  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
853  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
854  *    Non-Carbon CFM:   not available
855  }
856 { "Use CTFontCollectionCreateFromAvailableFonts()" }
ATSFontApplyFunctionnull857 function ATSFontApplyFunction( iFunction: ATSFontApplierFunction; iRefCon: UnivPtr ): OSStatus; external name '_ATSFontApplyFunction';
858 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
859 
860 {
861  *  ATSFontIteratorCreate()
862  *
863  *  Mac OS X threading:
864  *    Thread safe since version Jaguar
865  *
866  *  Availability:
867  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
868  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
869  *    Non-Carbon CFM:   not available
870  }
871 { "Use CTFontCollectionCreateFromAvailableFonts()" }
ATSFontIteratorCreatenull872 function ATSFontIteratorCreate( iContext: ATSFontContext; {const} iFilter: ATSFontFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontIterator ): OSStatus; external name '_ATSFontIteratorCreate';
873 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
874 
875 {
876  *  ATSFontIteratorRelease()
877  *
878  *  Mac OS X threading:
879  *    Thread safe since version Jaguar
880  *
881  *  Availability:
882  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
883  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
884  *    Non-Carbon CFM:   not available
885  }
ATSFontIteratorReleasenull886 function ATSFontIteratorRelease( var ioIterator: ATSFontIterator ): OSStatus; external name '_ATSFontIteratorRelease';
887 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
888 
889 
890 {
891  *  ATSFontIteratorReset()
892  *
893  *  Mac OS X threading:
894  *    Thread safe since version Jaguar
895  *
896  *  Availability:
897  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
898  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
899  *    Non-Carbon CFM:   not available
900  }
ATSFontIteratorResetnull901 function ATSFontIteratorReset( iContext: ATSFontContext; {const} iFilter: ATSFontFilterPtr { can be NULL }; iRefCon: UnivPtr; iOptions: ATSOptionFlags; var ioIterator: ATSFontIterator ): OSStatus; external name '_ATSFontIteratorReset';
902 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
903 
904 
905 {
906  *  ATSFontIteratorNext()
907  *
908  *  Mac OS X threading:
909  *    Thread safe since version Jaguar
910  *
911  *  Availability:
912  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
913  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
914  *    Non-Carbon CFM:   not available
915  }
ATSFontIteratorNextnull916 function ATSFontIteratorNext( iIterator: ATSFontIterator; var oFont: ATSFontRef ): OSStatus; external name '_ATSFontIteratorNext';
917 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
918 
919 
920 {
921  *  ATSFontFindFromName()
922  *
923  *  Mac OS X threading:
924  *    Thread safe since version Jaguar
925  *
926  *  Availability:
927  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
928  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
929  *    Non-Carbon CFM:   not available
930  }
931 { "Use CTFontCreateWithName()" }
ATSFontFindFromNamenull932 function ATSFontFindFromName( iName: CFStringRef; iOptions: ATSOptionFlags ): ATSFontRef; external name '_ATSFontFindFromName';
933 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
934 
935 {
936  *  ATSFontFindFromPostScriptName()
937  *
938  *  Mac OS X threading:
939  *    Thread safe since version Jaguar
940  *
941  *  Availability:
942  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
943  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
944  *    Non-Carbon CFM:   not available
945  }
946 { "Use CTFontCreateWithName()" }
ATSFontFindFromPostScriptNamenull947 function ATSFontFindFromPostScriptName( iName: CFStringRef; iOptions: ATSOptionFlags ): ATSFontRef; external name '_ATSFontFindFromPostScriptName';
948 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
949 
950 {
951  *  ATSFontFindFromContainer()
952  *
953  *  Mac OS X threading:
954  *    Thread safe since version Jaguar
955  *
956  *  Availability:
957  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
958  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
959  *    Non-Carbon CFM:   not available
960  }
961 { "Use CTFontDescriptorCreateMatchingFontDescriptors() with kCTFontURLAttribute or use CTFontManagerCreateFontDescriptorsFromURL()" }
ATSFontFindFromContainernull962 function ATSFontFindFromContainer( iContainer: ATSFontContainerRef; iOptions: ATSOptionFlags; iCount: ItemCount; ioArray: {variable-size-array} ATSFontRefPtr; var oCount: ItemCount ): OSStatus; external name '_ATSFontFindFromContainer';
963 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
964 
965 {
966  *  ATSFontGetGeneration()
967  *
968  *  Mac OS X threading:
969  *    Thread safe since version Jaguar
970  *
971  *  Availability:
972  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
973  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
974  *    Non-Carbon CFM:   not available
975  }
976 { "Register for kCTFontManagerRegisteredFontsChangedNotification notifications" }
ATSFontGetGenerationnull977 function ATSFontGetGeneration( iFont: ATSFontRef ): ATSGeneration; external name '_ATSFontGetGeneration';
978 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
979 
980 {
981  *  ATSFontGetName()
982  *
983  *  Mac OS X threading:
984  *    Thread safe since version Jaguar
985  *
986  *  Availability:
987  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
988  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
989  *    Non-Carbon CFM:   not available
990  }
991 { "Use CTFontCopyFullName()" }
ATSFontGetNamenull992 function ATSFontGetName( iFont: ATSFontRef; iOptions: ATSOptionFlags; var oName: CFStringRef ): OSStatus; external name '_ATSFontGetName';
993 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
994 
995 {
996  *  ATSFontGetPostScriptName()
997  *
998  *  Mac OS X threading:
999  *    Thread safe since version Jaguar
1000  *
1001  *  Availability:
1002  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1003  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1004  *    Non-Carbon CFM:   not available
1005  }
1006 { "Use CTFontCopyPostScriptName()" }
ATSFontGetPostScriptNamenull1007 function ATSFontGetPostScriptName( iFont: ATSFontRef; iOptions: ATSOptionFlags; var oName: CFStringRef ): OSStatus; external name '_ATSFontGetPostScriptName';
1008 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1009 
1010 {
1011  *  ATSFontGetTableDirectory()
1012  *
1013  *  Mac OS X threading:
1014  *    Thread safe since version Jaguar
1015  *
1016  *  Availability:
1017  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1018  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1019  *    Non-Carbon CFM:   not available
1020  }
1021 { "Use CTFontCopyAvailableTables()" }
ATSFontGetTableDirectorynull1022 function ATSFontGetTableDirectory( iFont: ATSFontRef; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_ATSFontGetTableDirectory';
1023 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1024 
1025 {
1026  *  ATSFontGetTable()
1027  *
1028  *  Mac OS X threading:
1029  *    Thread safe since version Jaguar
1030  *
1031  *  Availability:
1032  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1033  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1034  *    Non-Carbon CFM:   not available
1035  }
1036 { "Use CTFontCopyTable()" }
ATSFontGetTablenull1037 function ATSFontGetTable( iFont: ATSFontRef; iTag: FourCharCode; iOffset: ByteOffset; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_ATSFontGetTable';
1038 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1039 
1040 {
1041  *  ATSFontGetHorizontalMetrics()
1042  *
1043  *  Mac OS X threading:
1044  *    Thread safe since version Jaguar
1045  *
1046  *  Availability:
1047  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1048  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1049  *    Non-Carbon CFM:   not available
1050  }
1051 { "Use CTFontGetXHeight(), CTFontGetAscent(), and friends to find a specific metric." }
ATSFontGetHorizontalMetricsnull1052 function ATSFontGetHorizontalMetrics( iFont: ATSFontRef; iOptions: ATSOptionFlags; var oMetrics: ATSFontMetrics ): OSStatus; external name '_ATSFontGetHorizontalMetrics';
1053 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1054 
1055 {
1056  *  ATSFontGetVerticalMetrics()
1057  *
1058  *  Mac OS X threading:
1059  *    Thread safe since version Jaguar
1060  *
1061  *  Availability:
1062  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1063  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1064  *    Non-Carbon CFM:   not available
1065  }
1066 { "Use CTFontGetXHeight(), CTFontGetAscent(), and friends to find a specific metric." }
ATSFontGetVerticalMetricsnull1067 function ATSFontGetVerticalMetrics( iFont: ATSFontRef; iOptions: ATSOptionFlags; var oMetrics: ATSFontMetrics ): OSStatus; external name '_ATSFontGetVerticalMetrics';
1068 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1069 
1070 { ----------------------------------------------------------------------------------------- }
1071 { Compatibility                                                                             }
1072 { ----------------------------------------------------------------------------------------- }
1073 {
1074  *  ATSFontFamilyFindFromQuickDrawName()
1075  *
1076  *  Mac OS X threading:
1077  *    Thread safe since version Jaguar
1078  *
1079  *  Availability:
1080  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1081  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1082  *    Non-Carbon CFM:   not available
1083  }
1084 { "Use CTFontCreateWithQuickdrawInstance()" }
ATSFontFamilyFindFromQuickDrawNamenull1085 function ATSFontFamilyFindFromQuickDrawName( const (*var*) iName: Str255 ): ATSFontFamilyRef; external name '_ATSFontFamilyFindFromQuickDrawName';
1086 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1087 
1088 {
1089  *  ATSFontFamilyGetQuickDrawName()
1090  *
1091  *  Mac OS X threading:
1092  *    Thread safe since version Jaguar
1093  *
1094  *  Availability:
1095  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1096  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1097  *    Non-Carbon CFM:   not available
1098  }
1099 { "QuickDraw is deprecated" }
ATSFontFamilyGetQuickDrawNamenull1100 function ATSFontFamilyGetQuickDrawName( iFamily: ATSFontFamilyRef; var oName: Str255 ): OSStatus; external name '_ATSFontFamilyGetQuickDrawName';
1101 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1102 
1103 
1104 {$ifc TARGET_CPU_64}
1105 {
1106  *  ATSFontGetFileSpecification()   *** DEPRECATED ***
1107  *
1108  *  Deprecated:
1109  *    Use ATSFontGetFileReference instead.
1110  *
1111  *  Summary:
1112  *    Obtains the file specification for a font.
1113  *
1114  *  Mac OS X threading:
1115  *    Thread safe since version Jaguar
1116  *
1117  *  Parameters:
1118  *
1119  *    iFont:
1120  *      A reference to the font whose file specification you want to
1121  *      obtain.
1122  *
1123  *    oFile:
1124  *      On output, points to the file specification that specifies the
1125  *      name and location of a file or directory that contains the font
1126  *      data specified by the iFont parameter.
1127  *
1128  *  Result:
1129  *    noErr File specification obtained successfully.
1130  *
1131  *  Availability:
1132  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.5
1133  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1134  *    Non-Carbon CFM:   not available
1135  }
1136 { "Use CTFontCopyAttribute() with kCTFontURLAttribute." }
ATSFontGetFileSpecificationnull1137 function ATSFontGetFileSpecification( iFont: ATSFontRef; var oFile: ATSFSSpec ): OSStatus; external name '_ATSFontGetFileSpecification';
1138 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
1139 
1140 
1141 {$endc}	{ TARGET_CPU_64 }
1142 
1143 {
1144  *  ATSFontGetFileReference()
1145  *
1146  *  Summary:
1147  *    Obtains the file reference for a font.
1148  *
1149  *  Mac OS X threading:
1150  *    Thread safe since version 10.5
1151  *
1152  *  Parameters:
1153  *
1154  *    iFont:
1155  *      A reference to the font whose file specification you want to
1156  *      obtain.
1157  *
1158  *    oFile:
1159  *      On output, points to the file reference that specifies the name
1160  *      and location of a file or directory that contains the font data
1161  *      specified by the iFont parameter.
1162  *
1163  *  Result:
1164  *    noErr File specification obtained successfully.
1165  *
1166  *  Availability:
1167  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1168  *    CarbonLib:        not available
1169  *    Non-Carbon CFM:   not available
1170  }
1171 { "Use CTFontCopyAttribute() with kCTFontURLAttribute." }
ATSFontGetFileReferencenull1172 function ATSFontGetFileReference( iFont: ATSFontRef; var oFile: FSRef ): OSStatus; external name '_ATSFontGetFileReference';
1173 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1174 
1175 
1176 {
1177  *  ATSFontGetFontFamilyResource()
1178  *
1179  *  Mac OS X threading:
1180  *    Thread safe since version Jaguar
1181  *
1182  *  Availability:
1183  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework
1184  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.0 and later
1185  *    Non-Carbon CFM:   not available
1186  }
1187 { "QuickDraw is deprecated" }
ATSFontGetFontFamilyResourcenull1188 function ATSFontGetFontFamilyResource( iFont: ATSFontRef; iBufferSize: ByteCount; ioBuffer: UnivPtr; oSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_ATSFontGetFontFamilyResource';
1189 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1190 
1191 { ----------------------------------------------------------------------------------------- }
1192 { Notification                                                                              }
1193 { ----------------------------------------------------------------------------------------- }
1194 {
1195  *  ATSFontNotify()
1196  *
1197  *  Summary:
1198  *    Used to alert ATS that an action which may require notification
1199  *    to clients has occurred.
1200  *
1201  *  Mac OS X threading:
1202  *    Thread safe since version Jaguar
1203  *
1204  *  Parameters:
1205  *
1206  *    action:
1207  *      Action that should be taken by the ATS Server
1208  *
1209  *    info:
1210  *      Any required or optional information that may be required by
1211  *      the action taken.
1212  *
1213  *  Result:
1214  *    noErr Action successfully reported paramErr Invalid action passed
1215  *
1216  *  Availability:
1217  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
1218  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1219  *    Non-Carbon CFM:   not available
1220  }
1221 { "Register for kCTFontManagerRegisteredFontsChangedNotification notifications" }
ATSFontNotifynull1222 function ATSFontNotify( action: ATSFontNotifyAction; info: UnivPtr { can be NULL } ): OSStatus; external name '_ATSFontNotify';
1223 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1224 
1225 {
1226  *  ATSFontNotificationSubscribe()
1227  *
1228  *  Summary:
1229  *    Ask the ATS System to notify caller when certain events have
1230  *    occurred.  Note that your application must have a CFRunLoop in
1231  *    order to receive notifications. Any Appkit or Carbon event loop
1232  *    based application will have one by default.
1233  *
1234  *  Mac OS X threading:
1235  *    Thread safe since version Jaguar
1236  *
1237  *  Parameters:
1238  *
1239  *    callback:
1240  *      Function that will be called by the ATS system whenever an
1241  *      event of interest takes place.
1242  *
1243  *    options:
1244  *      Set the wanted ATSFontNotificationOptions to modify the default
1245  *      behavior of ATS Notifications.
1246  *
1247  *    iRefcon:
1248  *      User data/state which will be passed to the callback funtion
1249  *
1250  *    oNotificationRef:
1251  *      You may use this reference to un-subscribe to this notification.
1252  *
1253  *  Result:
1254  *    noErr Subscribed successfully paramErr NULL callback was passed.
1255  *    memFullErr Could not allocate enough memory for internal data
1256  *    structures.
1257  *
1258  *  Availability:
1259  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
1260  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1261  *    Non-Carbon CFM:   not available
1262  }
1263 { "Register for kCTFontManagerRegisteredFontsChangedNotification notifications" }
ATSFontNotificationSubscribenull1264 function ATSFontNotificationSubscribe( callback: ATSNotificationCallback; options: ATSFontNotifyOption; iRefcon: UnivPtr { can be NULL }; oNotificationRef: ATSFontNotificationRefPtr { can be NULL } ): OSStatus; external name '_ATSFontNotificationSubscribe';
1265 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1266 
1267 {
1268  *  ATSFontNotificationUnsubscribe()
1269  *
1270  *  Summary:
1271  *    Release subscription and stop receiving notifications for a given
1272  *    reference.
1273  *
1274  *  Mac OS X threading:
1275  *    Thread safe since version Jaguar
1276  *
1277  *  Parameters:
1278  *
1279  *    notificationRef:
1280  *      Notification reference for which you want to stop receiving
1281  *      notifications. Note, if more than one notification has been
1282  *      requested of ATS, you will still receive notifications on those
1283  *      requests.
1284  *
1285  *  Result:
1286  *    noErr Unsubscribed successfully paramErr NULL/invalid
1287  *    notificationRef passed
1288  *
1289  *  Availability:
1290  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
1291  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
1292  *    Non-Carbon CFM:   not available
1293  }
1294 { "Unregister for kCTFontManagerRegisteredFontsChangedNotification notifications" }
ATSFontNotificationUnsubscribenull1295 function ATSFontNotificationUnsubscribe( notificationRef: ATSFontNotificationRef ): OSStatus; external name '_ATSFontNotificationUnsubscribe';
1296 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1297 
1298 { ----------------------------------------------------------------------------------------- }
1299 { Font query message hooks                                                                  }
1300 { ----------------------------------------------------------------------------------------- }
1301 
1302 {
1303  *  ATSFontQuerySourceContext
1304  *
1305  *  Summary:
1306  *    A parameter block for client information to be retained by ATS
1307  *    and passed back to an ATSFontQueryCallback function.
1308  }
1309 type
1310 	ATSFontQuerySourceContextPtr = ^ATSFontQuerySourceContext;
1311 	ATSFontQuerySourceContext = record
1312 {
1313    * A 32-bit unsigned integer that indicates the version of this
1314    * structure. This should be set to 0.
1315    }
1316 		version: UInt32;
1317 
1318   {
1319    * A pointer-sized client datum that should be passed back to an
1320    * ATSFontQueryCallback function.
1321    }
1322 		refCon: UnivPtr;
1323 
1324   {
1325    * The callback used to add a retain to the refCon.
1326    }
1327 		retain: CFAllocatorRetainCallBack;
1328 
1329   {
1330    * The callback used to remove a retain to the refCon.
1331    }
1332 		release: CFAllocatorReleaseCallBack;
1333 	end;
1334 
1335 {
1336  *  ATSFontQueryMessageID
1337  *
1338  *  Discussion:
1339  *    Constants for ATS font query message types.
1340  }
1341 
1342 	ATSFontQueryMessageID = SInt32;
1343 const
1344 {
1345    * The message ID for a font request query. The data for a message
1346    * with this ID is a flattened CFDictionaryRef with keys and values
1347    * as decribed below. A query dictionary may have any or all of these
1348    * entries.
1349    }
1350 	kATSQueryActivateFontMessage = FourCharCode('atsa');
1351 
1352 
1353 {
1354  *  ATSFontQueryCallback
1355  *
1356  *  Summary:
1357  *    Callback for receiving font-related queries from ATS.
1358  *
1359  *  Parameters:
1360  *
1361  *    msgid:
1362  *      An ATSFontQueryMessageID that identifies the message type.
1363  *
1364  *    data:
1365  *      A CFPropertyListRef that represents the query. The content is
1366  *      message type-specific.
1367  *
1368  *    refCon:
1369  *      A pointer-sized client datum that was optionally provided to
1370  *      ATSCreateFontQueryRunLoopSource.
1371  *
1372  *  Result:
1373  *    A CFPropertyListRef that represents the message type-specific
1374  *    response to the query. May be NULL.
1375  }
1376 type
msgidnull1377 	ATSFontQueryCallback = function( msgid: ATSFontQueryMessageID; data: CFPropertyListRef; refCon: UnivPtr ): CFPropertyListRef;
1378 {
1379  *  ATSCreateFontQueryRunLoopSource()
1380  *
1381  *  Summary:
1382  *    Creates a CFRunLoopSourceRef that will be used to convey font
1383  *    queries from ATS.
1384  *
1385  *  Mac OS X threading:
1386  *    Thread safe since version Jaguar
1387  *
1388  *  Parameters:
1389  *
1390  *    queryOrder:
1391  *      A CFIndex that specifies the priority of this query receiver
1392  *      relative to others. When ATS makes a font query, it will send
1393  *      the query to each receiver in priority order, from highest to
1394  *      lowest. "Normal" priority is 0.
1395  *
1396  *    sourceOrder:
1397  *      The order of the created run loop source.
1398  *
1399  *    callout:
1400  *      A function pointer of type ATSFontQueryCallback that will be
1401  *      called to process a font query.
1402  *
1403  *    context:
1404  *      An ATSFontQuerySourceContext parameter block that provides a
1405  *      pointer-sized client datum which will be retained by ATS and
1406  *      passed to the callout function. May be NULL.
1407  *
1408  *  Result:
1409  *    A CFRunLoopSourceRef. To stop receiving queries, invalidate this
1410  *    run loop source.
1411  *
1412  *  Availability:
1413  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework
1414  *    CarbonLib:        not available
1415  *    Non-Carbon CFM:   not available
1416  }
1417 { "Use CTFontManagerCreateFontRequestRunLoopSource()" }
ATSCreateFontQueryRunLoopSourcenull1418 function ATSCreateFontQueryRunLoopSource( queryOrder: CFIndex; sourceOrder: CFIndex; callout: ATSFontQueryCallback; {const} context: ATSFontQuerySourceContextPtr { can be NULL } ): CFRunLoopSourceRef; external name '_ATSCreateFontQueryRunLoopSource';
1419 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1420 
1421 
1422 { ----------------------------------------------------------------------------------------- }
1423 { Font request query message content                                                        }
1424 { ----------------------------------------------------------------------------------------- }
1425 { Keys in a font request query dictionary. }
1426 { These keys appear in the dictionary for a kATSQueryActivateFontMessage query. }
1427 
1428 {
1429  *  kATSQueryClientPID
1430  *
1431  *  Discussion:
1432  *    The process ID of the application making the query. The
1433  *    corresponding value is a CFNumberRef that contains a pid_t.
1434  }
1435 {$ifc USE_CFSTR_CONSTANT_MACROS}
1436 {$definec kATSQueryClientPID CFSTRP('ATS client pid')}
1437 {$endc}
1438 
1439 {
1440  *  kATSQueryQDFamilyName
1441  *
1442  *  Discussion:
1443  *    The Quickdraw-style family name of the font being requested, e.g.
1444  *    the name passed to GetFNum. The corresponding value is a
1445  *    CFStringRef.
1446  }
1447 {$ifc USE_CFSTR_CONSTANT_MACROS}
1448 {$definec kATSQueryQDFamilyName CFSTRP('font family name')}
1449 {$endc}
1450 
1451 {
1452  *  kATSQueryFontName
1453  *
1454  *  Discussion:
1455  *    The name of the font being requested. The corresponding value is
1456  *    a CFStringRef suitable as an argument to ATSFontFindFromName().
1457  *    This should match a candidate font's unique or full name.
1458  }
1459 {$ifc USE_CFSTR_CONSTANT_MACROS}
1460 {$definec kATSQueryFontName CFSTRP('font name')}
1461 {$endc}
1462 
1463 {
1464  *  kATSQueryFontPostScriptName
1465  *
1466  *  Discussion:
1467  *    The PostScript name of the font being requested. The
1468  *    corresponding value is a CFStringRef suitable as an argument to
1469  *    ATSFontFindFromPostScriptName(). This should match either the
1470  *    PostScript name derived from the font's FOND resource or its sfnt
1471  *    name table, with preference given to the FOND PostScript name.
1472  }
1473 {$ifc USE_CFSTR_CONSTANT_MACROS}
1474 {$definec kATSQueryFontPostScriptName CFSTRP('font PS name')}
1475 {$endc}
1476 
1477 {
1478  *  kATSQueryFontNameTableEntries
1479  *
1480  *  Discussion:
1481  *    A descriptor for sfnt name table entries that the requested font
1482  *    must have. The corresponding value is a CFArrayRef of
1483  *    CFDictionaryRefs that describe name table entries. A font must
1484  *    have all of the specified entries to be considered a match.
1485  }
1486 {$ifc USE_CFSTR_CONSTANT_MACROS}
1487 {$definec kATSQueryFontNameTableEntries CFSTRP('font name table entries')}
1488 {$endc}
1489 { Keys in a font raw name descriptor dictionary. }
1490 
1491 {
1492  *  kATSFontNameTableCode
1493  *
1494  *  Discussion:
1495  *    The font name's name code. The corresponding value is a
1496  *    CFNumberRef. If missing, assume kFontNoNameCode.
1497  }
1498 {$ifc USE_CFSTR_CONSTANT_MACROS}
1499 {$definec kATSFontNameTableCode CFSTRP('font name code')}
1500 {$endc}
1501 
1502 {
1503  *  kATSFontNameTablePlatform
1504  *
1505  *  Discussion:
1506  *    The font name's platform code. The corresponding value is a
1507  *    CFNumberRef. If missing, assume kFontNoPlatformCode.
1508  }
1509 {$ifc USE_CFSTR_CONSTANT_MACROS}
1510 {$definec kATSFontNameTablePlatform CFSTRP('font platform code')}
1511 {$endc}
1512 
1513 {
1514  *  kATSFontNameTableScript
1515  *
1516  *  Discussion:
1517  *    The font name's script code. The corresponding value is a
1518  *    CFNumberRef. If missing, assume kFontNoScriptCode.
1519  }
1520 {$ifc USE_CFSTR_CONSTANT_MACROS}
1521 {$definec kATSFontNameTableScript CFSTRP('font script code')}
1522 {$endc}
1523 
1524 {
1525  *  kATSFontNameTableLanguage
1526  *
1527  *  Discussion:
1528  *    The font name's language code. The corresponding value is a
1529  *    CFNumberRef. If missing, assume kFontNoLanguageCode.
1530  }
1531 {$ifc USE_CFSTR_CONSTANT_MACROS}
1532 {$definec kATSFontNameTableLanguage CFSTRP('font language code')}
1533 {$endc}
1534 
1535 {
1536  *  kATSFontNameTableBytes
1537  *
1538  *  Discussion:
1539  *    The raw bytes of the font name. The corresponding value is a
1540  *    CFDataRef that contains the raw name bytes.
1541  }
1542 {$ifc USE_CFSTR_CONSTANT_MACROS}
1543 {$definec kATSFontNameTableBytes CFSTRP('font name table bytes')}
1544 {$endc}
1545 { ----------------------------------------------------------------------------------------- }
1546 { Auto activation settings                                                                  }
1547 { ----------------------------------------------------------------------------------------- }
1548 
1549 {
1550  *  ATSAutoActivationSetting
1551  *
1552  *  Summary:
1553  *    Values for auto activation settings.
1554  }
1555 const
1556 {
1557    * Resets the setting the the default state. For application settings
1558    * this clears the setting. For the global setting it will revert to
1559    * the initial system setting, kATSFontAutoActivationEnabled.
1560    }
1561 	kATSFontAutoActivationDefault = 0;
1562 	kATSFontAutoActivationDisabled = 1;
1563 	kATSFontAutoActivationEnabled = 2;
1564 
1565   {
1566    * Asks the user before auto-activating fonts requested by the
1567    * application.
1568    }
1569 	kATSFontAutoActivationAsk = 4;
1570 
1571 
1572 type
1573 	ATSFontAutoActivationSetting = UInt32;
1574 {
1575  *  ATSFontSetGlobalAutoActivationSetting()
1576  *
1577  *  Summary:
1578  *    Sets the user's global auto-activation setting.
1579  *
1580  *  Discussion:
1581  *    This function can be used to set the user's global
1582  *    auto-activation setting.
1583  *
1584  *  Mac OS X threading:
1585  *    Thread safe since version Leopard
1586  *
1587  *  Parameters:
1588  *
1589  *    iSetting:
1590  *      One of the enumerated constants above specifying the setting
1591  *      for font auto-activation. Will return paramErr on invalid input.
1592  *
1593  *  Availability:
1594  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1595  *    CarbonLib:        not available
1596  *    Non-Carbon CFM:   not available
1597  }
1598 { "Use CTFontManagerSetAutoActivationSetting() with kCTFontManagerBundleIdentifier" }
ATSFontSetGlobalAutoActivationSettingnull1599 function ATSFontSetGlobalAutoActivationSetting( iSetting: ATSFontAutoActivationSetting ): OSStatus; external name '_ATSFontSetGlobalAutoActivationSetting';
1600 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1601 
1602 {
1603  *  ATSFontGetGlobalAutoActivationSetting()
1604  *
1605  *  Summary:
1606  *    Gets the user's global auto-activation setting.
1607  *
1608  *  Discussion:
1609  *    This function can be used to get the user's global
1610  *    auto-activation setting.
1611  *
1612  *  Mac OS X threading:
1613  *    Thread safe since version Leopard
1614  *
1615  *  Availability:
1616  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1617  *    CarbonLib:        not available
1618  *    Non-Carbon CFM:   not available
1619  }
1620 { "Use CTFontManagerGetAutoActivationSetting() with kCTFontManagerBundleIdentifier" }
ATSFontGetGlobalAutoActivationSettingnull1621 function ATSFontGetGlobalAutoActivationSetting: ATSFontAutoActivationSetting; external name '_ATSFontGetGlobalAutoActivationSetting';
1622 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1623 
1624 {
1625  *  ATSFontSetAutoActivationSettingForApplication()
1626  *
1627  *  Summary:
1628  *    Sets the auto-activation setting for the specified application
1629  *    bundle.
1630  *
1631  *  Discussion:
1632  *    This function can be used to set the auto-activation setting for
1633  *    the specified application. The per-application setting overrides
1634  *    the global setting.
1635  *
1636  *  Mac OS X threading:
1637  *    Thread safe since version Leopard
1638  *
1639  *  Parameters:
1640  *
1641  *    iSetting:
1642  *      One of the enumerated constants above specifying the setting
1643  *      for font auto-activation. Specifying
1644  *      kATSFontAutoActivationDefault will clear the application
1645  *      specific setting and the global setting will be used.
1646  *
1647  *    iApplicationFileURL:
1648  *      A valid file URL for an application. Passing NULL for this
1649  *      parameter indicates the current process.
1650  *
1651  *  Result:
1652  *    An OSStatus code. Will return noErr on success, and paramErr on
1653  *    any invalid input. May return memFullErr if unable to allocate
1654  *    temporary structures.
1655  *
1656  *  Availability:
1657  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1658  *    CarbonLib:        not available
1659  *    Non-Carbon CFM:   not available
1660  }
1661 { "Use CTFontManagerSetAutoActivationSetting()" }
ATSFontSetAutoActivationSettingForApplicationnull1662 function ATSFontSetAutoActivationSettingForApplication( iSetting: ATSFontAutoActivationSetting; iApplicationFileURL: CFURLRef ): OSStatus; external name '_ATSFontSetAutoActivationSettingForApplication';
1663 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1664 
1665 {
1666  *  ATSFontGetAutoActivationSettingForApplication()
1667  *
1668  *  Summary:
1669  *    Query the activation setting for the specified application.
1670  *
1671  *  Discussion:
1672  *    This function can be used to query the auto-activation setting
1673  *    for the specified application. The setting is the app-specific
1674  *    setting if available, otherwise it is
1675  *    kATSFontAutoActivationDefault.
1676  *
1677  *  Mac OS X threading:
1678  *    Thread safe since version Leopard
1679  *
1680  *  Parameters:
1681  *
1682  *    iApplicationFileURL:
1683  *      A valid file URL for an application. Passing NULL for this
1684  *      parameter indicates the current process.
1685  *
1686  *  Result:
1687  *    Returns the setting that will be used for the specified
1688  *    application. If this returns kATSFontAutoActivationDefault the
1689  *    global setting will be used.
1690  *
1691  *  Availability:
1692  *    Mac OS X:         in version 10.5 and later in ApplicationServices.framework
1693  *    CarbonLib:        not available
1694  *    Non-Carbon CFM:   not available
1695  }
1696 { "Use CTFontManagerGetAutoActivationSetting()" }
ATSFontGetAutoActivationSettingForApplicationnull1697 function ATSFontGetAutoActivationSettingForApplication( iApplicationFileURL: CFURLRef ): ATSFontAutoActivationSetting; external name '_ATSFontGetAutoActivationSettingForApplication';
1698 (* AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8 *)
1699 
1700 {$endc} {TARGET_OS_MAC}
1701 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
1702 
1703 end.
1704 {$endc} {not MACOSALLINCLUDE}
1705