1 {
2      File:       QD/ATSUnicodeObjects.h
3 
4      Contains:   ATSUI object manipulation functions.
5 
6      Version:    Quickdraw-285~150
7 
8      Copyright:  � 2003-2008 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 {  Pascal Translation:  Peter N Lewis, <peter@stairways.com.au>, 2004 }
17 {  Pascal Translation Updated:  Jonas Maebe, <jonas@freepascal.org>, 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 ATSUnicodeObjects;
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,ATSUnicodeTypes,TextCommon,SFNTLayoutTypes;
219 {$endc} {not MACOSALLINCLUDE}
220 
221 
222 {$ifc TARGET_OS_MAC}
223 
224 {$ALIGN POWER}
225 
226 
227 { ---------------------------------------------------------------------------- }
228 {  ATSUI basic style functions                                                 }
229 { ---------------------------------------------------------------------------- }
230 
231 
232 {
233  *  ATSUCreateStyle()   *** DEPRECATED ***
234  *
235  *  Deprecated:
236  *    Use CTFontCopyGraphicsFont, CTFontCreateWithGraphicsFont,
237  *    CTFontCreateWithPlatformFont, CTFontCreateWithQuickdrawInstance,
238  *    CTFontCreateUIFontForLanguage, CTFontCreateCopyWithAttributes,
239  *    CTFontCreateCopyWithSymbolicTraits, CTFontCreateCopyWithFamily,
240  *    CTFontCreateForString, CTFontCreateWithName, or
241  *    CTFontCreateWithFontDescriptor instead.
242  *
243  *  Summary:
244  *    Creates an ATSUStyle object with default settings.
245  *
246  *  Discussion:
247  *    ATSUStyle objects created by this function have a default set of
248  *    values for all attributes. The attributes include settings such
249  *    as font, point size, color and so on. You can change the
250  *    attributes of a style object by calling the function
251  *    ATSUSetAttributes. You can also change font features and
252  *    variations set in an ATSUStyle by calling the functions
253  *    ATSUSetFontFeatures and ATSUSetVariations, respectively.
254  *    ATSUStyle objects are used by associating them with a run of
255  *    characters in an ATSUTextLayout object. You can do this by
256  *    calling functions such as ATSUSetRunStyle or
257  *    ATSUCreateTextLayoutWithTextPtr. You are responsible for freeing
258  *    memory assoicated with an ATSUStyle object by calling
259  *    ATSUDisposeStyle.
260  *
261  *  Parameters:
262  *
263  *    oStyle:
264  *      On return, a reference to an ATSUStyle object with default
265  *      settings.
266  *
267  *  Result:
268  *    On success, noErr is returned. See MacErrors.h for possible error
269  *    codes.
270  *
271  *  Availability:
272  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
273  *    CarbonLib:        in CarbonLib 1.0 and later
274  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
275  }
ATSUCreateStylenull276 function ATSUCreateStyle( var oStyle: ATSUStyle ): OSStatus; external name '_ATSUCreateStyle';
277 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
278 
279 
280 {$ifc not TARGET_CPU_64}
281 {
282  *  ATSUCreateAndCopyStyle()   *** DEPRECATED ***
283  *
284  *  Deprecated:
285  *    Use CTFontCopyGraphicsFont, CTFontCreateWithGraphicsFont,
286  *    CTFontCreateWithPlatformFont, CTFontCreateWithQuickdrawInstance,
287  *    CTFontCreateUIFontForLanguage, CTFontCreateCopyWithAttributes,
288  *    CTFontCreateCopyWithSymbolicTraits, CTFontCreateCopyWithFamily,
289  *    CTFontCreateForString, CTFontCreateWithName, or
290  *    CTFontCreateWithFontDescriptor instead.
291  *
292  *  Summary:
293  *    Creates a new ATSUStyle object with the same attributes, font
294  *    features, and font variation settings as the input style.
295  *
296  *  Discussion:
297  *    All attributes, font features, and font variation settings of the
298  *    input ATSUStyle object are copied over to a newly created
299  *    ATSUStyle object. Note that reference constants are not copied.
300  *    You are responsible for freeing memory assoicated with the
301  *    returned ATSUStyle object by calling ATSUDisposeStyle.
302  *
303  *  Parameters:
304  *
305  *    iStyle:
306  *      The ATSUStyle object you want to copy.
307  *
308  *    oStyle:
309  *      On return, a newly created ATSUStyle object. This will be an
310  *      exact copy of iStyle, except for the reference constant (if
311  *      set).
312  *
313  *  Result:
314  *    On success, noErr is returned. See MacErrors.h for possible error
315  *    codes.
316  *
317  *  Availability:
318  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
319  *    CarbonLib:        in CarbonLib 1.0 and later
320  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
321  }
ATSUCreateAndCopyStylenull322 function ATSUCreateAndCopyStyle( iStyle: ATSUStyle; var oStyle: ATSUStyle ): OSStatus; external name '_ATSUCreateAndCopyStyle';
323 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
324 
325 
326 {$endc} {not TARGET_CPU_64}
327 
328 {
329  *  ATSUDisposeStyle()   *** DEPRECATED ***
330  *
331  *  Deprecated:
332  *    Use CoreText API and CFRelease instead.
333  *
334  *  Summary:
335  *    Disposes of the memory associated with a style object.
336  *
337  *  Discussion:
338  *    The ATSUDisposeStyle function frees the memory associated with
339  *    the specified style object and its internal structures, including
340  *    style run attributes. It does not dispose of the memory pointed
341  *    to by application-defined style run attributes or reference
342  *    constants. You are responsible for doing so. You should call this
343  *    function after calling the function ATSUDisposeTextLayout to
344  *    dispose of any text layout objects associated with the style
345  *    object. For best performance, once you create a style object, you
346  *    should keep it and use it as often as needed. You should dispose
347  *    of the style object only when it is no longer needed in your
348  *    application.
349  *
350  *  Parameters:
351  *
352  *    iStyle:
353  *      The style you want to dispose of.
354  *
355  *  Result:
356  *    On success, noErr is returned. See MacErrors.h for possible error
357  *    codes.
358  *
359  *  Availability:
360  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
361  *    CarbonLib:        in CarbonLib 1.0 and later
362  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
363  }
ATSUDisposeStylenull364 function ATSUDisposeStyle( iStyle: ATSUStyle ): OSStatus; external name '_ATSUDisposeStyle';
365 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
366 
367 
368 {$ifc not TARGET_CPU_64}
369 {
370  *  ATSUSetStyleRefCon()   *** DEPRECATED ***
371  *
372  *  Deprecated:
373  *    Use CTFontDescriptorCopyAttributes instead.
374  *
375  *  Summary:
376  *    Sets a reference constant for an ATSUStyle object.
377  *
378  *  Discussion:
379  *    Reference constants are any 32-bit value you wish to associate
380  *    with an object. It can be a pointer to application-specific data,
381  *    a integer value, or anything you like. If you copy or clear a
382  *    style object that contains a reference constant, the reference
383  *    constant is neither copied nor removed. To obtain the reference
384  *    constant for a particular ATSUStyle object after it has been set,
385  *    use the function ATSUGetStyleRefCon.
386  *
387  *  Parameters:
388  *
389  *    iStyle:
390  *      An ATSUStyle object you want to set the reference constant for.
391  *
392  *    iRefCon:
393  *      Any arbitrary 32-bit value containing or referring to
394  *      application-specific data.
395  *
396  *  Result:
397  *    On success, noErr is returned. See MacErrors.h for possible error
398  *    codes.
399  *
400  *  Availability:
401  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
402  *    CarbonLib:        in CarbonLib 1.0 and later
403  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
404  }
ATSUSetStyleRefConnull405 function ATSUSetStyleRefCon( iStyle: ATSUStyle; iRefCon: URefCon ): OSStatus; external name '_ATSUSetStyleRefCon';
406 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
407 
408 
409 {
410  *  ATSUGetStyleRefCon()   *** DEPRECATED ***
411  *
412  *  Deprecated:
413  *    Use CTFontDescriptorCopyAttributes instead.
414  *
415  *  Summary:
416  *    Returns the reference constant for an ATSUStyle object.
417  *
418  *  Discussion:
419  *    Together with ATSUSetStyleRefCon, this function provides a
420  *    mechanism for keeping application-specific data associated with
421  *    ATSUStyle objects. Note that if an ATSUStyle object is copied or
422  *    cleared, its associated reference constant, if any, is not copied
423  *    or cleared.
424  *
425  *  Parameters:
426  *
427  *    iStyle:
428  *      The style object for which to obtain application-specific data.
429  *
430  *    oRefCon:
431  *      On return, the reference constant for iStyle.
432  *
433  *  Result:
434  *    On success, noErr is returned. If no reference constant is set in
435  *    iStyle, paramErr is returned. See MacErrors.h for other possible
436  *    error codes.
437  *
438  *  Availability:
439  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
440  *    CarbonLib:        in CarbonLib 1.0 and later
441  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
442  }
ATSUGetStyleRefConnull443 function ATSUGetStyleRefCon( iStyle: ATSUStyle; var oRefCon: URefCon ): OSStatus; external name '_ATSUGetStyleRefCon';
444 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
445 
446 
447 { ---------------------------------------------------------------------------- }
448 {  ATSUI style comparison                                                      }
449 { ---------------------------------------------------------------------------- }
450 {
451  *  ATSUCompareStyles()   *** DEPRECATED ***
452  *
453  *  Deprecated:
454  *    Use CTFontDescriptorCreateMatchingFontDescriptor instead.
455  *
456  *  Summary:
457  *    Compares two ATSUStyleObjects.
458  *
459  *  Discussion:
460  *    The ATSUCompareStyles function compares the contents of two style
461  *    objects, including their style attributes, font features, and
462  *    font variations. It does not consider reference constants or
463  *    application-defined style attributes in the comparison. Note that
464  *    order is important, as the ATSUStyleComparison constants that can
465  *    be returned indicate "contains" vs. "contained by" based on which
466  *    style is considered first in the comparsion.
467  *
468  *  Parameters:
469  *
470  *    iFirstStyle:
471  *      The first style to be compared.
472  *
473  *    iSecondStyle:
474  *      The second style to be compared.
475  *
476  *    oComparison:
477  *      On return, the value contains the results of the comparison and
478  *      indicates whether the two style objects are the same,
479  *      different, or if one is a subset of the other. See the
480  *      definition of the ATSUStyleComparison type for more information
481  *      on possible values returned for this parameter.
482  *
483  *  Result:
484  *    On success, noErr is returned. See MacErrors.h for possible error
485  *    codes.
486  *
487  *  Availability:
488  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
489  *    CarbonLib:        in CarbonLib 1.0 and later
490  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
491  }
ATSUCompareStylesnull492 function ATSUCompareStyles( iFirstStyle: ATSUStyle; iSecondStyle: ATSUStyle; var oComparison: ATSUStyleComparison ): OSStatus; external name '_ATSUCompareStyles';
493 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
494 
495 
496 { ---------------------------------------------------------------------------- }
497 {  ATSUI style attribute manipulation                                          }
498 { ---------------------------------------------------------------------------- }
499 {
500  *  ATSUCopyAttributes()   *** DEPRECATED ***
501  *
502  *  Deprecated:
503  *    Use CTFontDescriptorCreateCopyWithAttributes instead.
504  *
505  *  Summary:
506  *    Copies attributes from one style to another.
507  *
508  *  Discussion:
509  *    There are three types of settings in a style: attributes, font
510  *    features, and font variations. This function copies only the
511  *    first. To copy all three types of settings, use the function
512  *    ATSUCreateAndCopyStyle. Also note that this function does not
513  *    copy reference constants.
514  *
515  *  Parameters:
516  *
517  *    iSourceStyle:
518  *      The style whose attributes you are copying from.
519  *
520  *    iDestinationStyle:
521  *      The style whose attributes you are copying to.
522  *
523  *  Result:
524  *    On success, noErr is returned. See MacErrors.h for possible error
525  *    codes.
526  *
527  *  Availability:
528  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
529  *    CarbonLib:        in CarbonLib 1.0 and later
530  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
531  }
ATSUCopyAttributesnull532 function ATSUCopyAttributes( iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle ): OSStatus; external name '_ATSUCopyAttributes';
533 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
534 
535 
536 {
537  *  ATSUOverwriteAttributes()   *** DEPRECATED ***
538  *
539  *  Deprecated:
540  *    Use CTFontDescriptorCreateCopyWithAttributes instead.
541  *
542  *  Summary:
543  *    Copies to a destination style object the nondefault style
544  *    attribute settings of a source style object.
545  *
546  *  Discussion:
547  *    The ATSUOverwriteAttributes function copies all nondefault style
548  *    attribute values from a source style object to a destination
549  *    style object. The source object's nondefault values are applied
550  *    to the destination object whether or not the destination object
551  *    also has nondefault values for the copied attributes. All other
552  *    settings in the destination style object are left unchanged.
553  *    ATSUOverwriteAttributes does not copy the contents of memory
554  *    referenced by pointers within custom style attributes or within
555  *    reference constants. You are responsible for ensuring that this
556  *    memory remains valid until both the source and destination style
557  *    objects are disposed of. To create a style object that contains
558  *    all the contents of another style object, call the function
559  *    ATSUCreateAndCopyStyle. To copy all the style attributes
560  *    (including any default settings) of a style object into an
561  *    existing style object, call the function ATSUCopyAttributes. To
562  *    copy style attributes that are set in the source but not in the
563  *    destination style object, call the function
564  *    ATSUUnderwriteAttributes.
565  *
566  *  Parameters:
567  *
568  *    iSourceStyle:
569  *      An ATSUStyle value specifying the style object from which to
570  *      copy nondefault style attributes.
571  *
572  *    iDestinationStyle:
573  *      An ATSUStyle value specifying the style object containing the
574  *      style attributes to be overwritten.
575  *
576  *  Result:
577  *    On success, noErr is returned. See MacErrors.h for possible error
578  *    codes.
579  *
580  *  Availability:
581  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
582  *    CarbonLib:        in CarbonLib 1.0 and later
583  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
584  }
ATSUOverwriteAttributesnull585 function ATSUOverwriteAttributes( iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle ): OSStatus; external name '_ATSUOverwriteAttributes';
586 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
587 
588 
589 {
590  *  ATSUUnderwriteAttributes()   *** DEPRECATED ***
591  *
592  *  Deprecated:
593  *    Use CTFontDescriptorCreateCopyWithAttributes instead.
594  *
595  *  Summary:
596  *    Copies to a destination style object only those nondefault style
597  *    attribute settings of a source style object that are at default
598  *    settings in the destination object.
599  *
600  *  Discussion:
601  *    The ATSUUnderwriteAttributes function copies to a destination
602  *    style object only those nondefault style attribute values of a
603  *    source style object that are not currently set in a destination
604  *    style object. Note that the corresponding value in the
605  *    destination object must not be set in order for a copied value to
606  *    be applied. All other quantities in the destination style object
607  *    are left unchanged. ATSUUnderwriteAttributes does not copy the
608  *    contents of memory referenced by pointers within custom style
609  *    attributes or within reference constants. You are responsible for
610  *    ensuring that this memory remains valid until both the source and
611  *    destination style objects are disposed of. To create a style
612  *    object that contains all the contents of another style object,
613  *    call the function ATSUCreateAndCopyStyle. To copy all the style
614  *    attributes (including any default settings) of a style object
615  *    into an existing style object, call the function
616  *    ATSUCopyAttributes. To copy style attributes that are set in the
617  *    source whether or not they are set in the destination style
618  *    object, call the function ATSUOverwriteAttributes.
619  *
620  *  Parameters:
621  *
622  *    iSourceStyle:
623  *      An ATSUStyle value specifying the style object from which to
624  *      copy nondefault style attributes.
625  *
626  *    iDestinationStyle:
627  *      An ATSUStyle value specifying the style object containing style
628  *      attribute values to be set.
629  *
630  *  Result:
631  *    On success, noErr is returned. See MacErrors.h for possible error
632  *    codes.
633  *
634  *  Availability:
635  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
636  *    CarbonLib:        in CarbonLib 1.0 and later
637  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
638  }
ATSUUnderwriteAttributesnull639 function ATSUUnderwriteAttributes( iSourceStyle: ATSUStyle; iDestinationStyle: ATSUStyle ): OSStatus; external name '_ATSUUnderwriteAttributes';
640 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
641 
642 
643 { ---------------------------------------------------------------------------- }
644 {  Empty ATSUI styles                                                          }
645 { ---------------------------------------------------------------------------- }
646 {
647  *  ATSUClearStyle()   *** DEPRECATED ***
648  *
649  *  Deprecated:
650  *    Use CoreText API and CFRelease instead.
651  *
652  *  Summary:
653  *    Restores default values to a style object.
654  *
655  *  Discussion:
656  *    Clears a style object of all style attributes (including any
657  *    application-defined attributes), font features, and font
658  *    variations and returns these values to their default settings. To
659  *    clear attributes, font features, or font variations individually,
660  *    use the functions ATSUClearAttributes, ATSUClearFontVariations,
661  *    or ATSUClearFontFeatures, respectively. Note that ATSUClearStyle
662  *    does not affect Reference constants.
663  *
664  *  Parameters:
665  *
666  *    iStyle:
667  *      The style to be cleared.
668  *
669  *  Result:
670  *    On success, noErr is returned. See MacErrors.h for possible error
671  *    codes.
672  *
673  *  Availability:
674  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
675  *    CarbonLib:        in CarbonLib 1.0 and later
676  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
677  }
ATSUClearStylenull678 function ATSUClearStyle( iStyle: ATSUStyle ): OSStatus; external name '_ATSUClearStyle';
679 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
680 
681 
682 {
683  *  ATSUStyleIsEmpty()   *** DEPRECATED ***
684  *
685  *  Deprecated:
686  *    Use CoreText API instead.
687  *
688  *  Summary:
689  *    Indicates whether a style object contains only default values.
690  *
691  *  Discussion:
692  *    You can call the ATSUStyleIsEmpty function to determine whether a
693  *    style object contains only default values for style attributes,
694  *    font features, and font variations. ATSUStyleIsEmpty does not
695  *    consider reference constants in its evaluation.
696  *
697  *  Parameters:
698  *
699  *    iStyle:
700  *      An ATSUStyle value specifying the style object to examine.
701  *
702  *    oIsClear:
703  *      On return, the value is set to true if the style object
704  *      contains only default values for style attributes, font
705  *      features, and font variations. If false , the style object
706  *      contains one or more nondefault values for style attributes,
707  *      font features, or font variations. Reference constants do not
708  *      affect this result.
709  *
710  *  Result:
711  *    On success, noErr is returned. See MacErrors.h for possible error
712  *    codes.
713  *
714  *  Availability:
715  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
716  *    CarbonLib:        in CarbonLib 1.0 and later
717  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
718  }
ATSUStyleIsEmptynull719 function ATSUStyleIsEmpty( iStyle: ATSUStyle; var oIsClear: Boolean ): OSStatus; external name '_ATSUStyleIsEmpty';
720 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
721 
722 
723 { ---------------------------------------------------------------------------- }
724 {  ATSUI style attribute getters and setters                                   }
725 { ---------------------------------------------------------------------------- }
726 {
727  *  ATSUCalculateBaselineDeltas()   *** DEPRECATED ***
728  *
729  *  Deprecated:
730  *    Use CoreText API instead.
731  *
732  *  Summary:
733  *    Obtains the optimal baseline positions for glyphs in a style run.
734  *
735  *  Discussion:
736  *    Depending on the writing system, a baseline may be above, below,
737  *    or through the centers of glyphs. In general, a style run has a
738  *    default baseline, to which all glyphs are visually aligned when
739  *    the text is laid out. For example, in a run of Roman text, the
740  *    default baseline is the Roman baseline, upon which glyphs sit
741  *    (except for descenders, which extend below the baseline). You can
742  *    call the ATSUCalculateBaselineDeltas function to obtain the
743  *    distances from a specified baseline type to that of other
744  *    baseline types for a given style object.
745  *    ATSUCalculateBaselineDeltas takes into account font and text size
746  *    when performing these calculations. ATSUI uses these distances to
747  *    determine the cross-stream shifting to apply when aligning glyphs
748  *    in a style run. You can use the resulting array to set or obtain
749  *    the optimal baseline positions of glyphs in a style run. You can
750  *    also set various baseline values to create special effects such
751  *    as drop capitals. The functions ATSUSetLineControls and
752  *    ATSUSetLayoutControls allow you to set baseline offset values at
753  *    the line or layout level, respectively, using the
754  *    kATSULineBaselineValuesTag control attribute tag.
755  *
756  *  Parameters:
757  *
758  *    iStyle:
759  *      An ATSUStyle value specifying the style object to examine.
760  *
761  *    iBaselineClass:
762  *      A BslnBaselineClass constant identifying the primary baseline
763  *      from which to measure other baselines. See SFNTLayoutTypes.h
764  *      for an enumeration of possible values. Pass the constant
765  *      kBSLNNoBaselineOverride to use the standard baseline value from
766  *      the current font.
767  *
768  *    oBaselineDeltas:
769  *      On return, an array that contains baseline offsets, specifying
770  *      distances measured in points, from the default baseline to each
771  *      of the other baseline types in the style object. Positive
772  *      values indicate baselines above the default baseline and
773  *      negative values indicate baselines below it. See
774  *      SFNTLayoutTypes.h for a description of the BslnBaselineRecord
775  *      type.
776  *
777  *  Result:
778  *    On success, noErr is returned. See MacErrors.h for possible error
779  *    codes.
780  *
781  *  Availability:
782  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
783  *    CarbonLib:        in CarbonLib 1.0 and later
784  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
785  }
ATSUCalculateBaselineDeltasnull786 function ATSUCalculateBaselineDeltas( iStyle: ATSUStyle; iBaselineClass: BslnBaselineClass; oBaselineDeltas: BslnBaselineRecord ): OSStatus; external name '_ATSUCalculateBaselineDeltas';
787 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
788 
789 
790 {$endc} {not TARGET_CPU_64}
791 
792 {
793  *  ATSUSetAttributes()   *** DEPRECATED ***
794  *
795  *  Deprecated:
796  *    Use CTFontDescriptorCreateWithNameAndSize,
797  *    CTFontDescriptorCreateWithAttributes, or
798  *    CTFontDescriptorCreateCopyWithAttributes instead.
799  *
800  *  Summary:
801  *    Sets style attribute values in a style object.
802  *
803  *  Discussion:
804  *    Style attributes are a collection of values and settings that
805  *    specify information about a style such as font, point size, and
806  *    color. To specify a style attribute, ATSUI uses a "triple"
807  *    consisting of (1) an attribute tag, (2) a value for that tag, and
808  *    (3) the size of the value. For a list of possible tags and their
809  *    default values, see the ATSUI documentation, or the definition of
810  *    ATSUAttributeTag elsewhere in this header file. When you call
811  *    ATSUSetAttributes, any style attributes that you do not set
812  *    retain their previous values. To set font features and font
813  *    variations, call the functions ATSUSetFontFeatures and
814  *    ATSUSetVariations, respectively.
815  *
816  *  Parameters:
817  *
818  *    iStyle:
819  *      A style in which to set attributes.
820  *
821  *    iAttributeCount:
822  *      An ItemCount value specifying the number of attributes to set.
823  *      This value should correspond to the number of elements in the
824  *      iTag, iValueSize, and iValue arrays.
825  *
826  *    iTag:
827  *      An array of attribute tags. The number of elements in this
828  *      array must not be less than iAttributeCount. Each element in
829  *      the array must contain a valid style attribute tag (see the
830  *      definition of ATSUAttributeTag for possible values).
831  *
832  *    iValueSize:
833  *      An array of ByteCount values. The number of elements in this
834  *      array must not be less than iAttributeCount. Each ByteCount
835  *      value corresoponds to the size of an element referred to by a
836  *      pointer in the iValue array.
837  *
838  *    iValue:
839  *      An array of pointers of type ATSUAttributeValuePtr. Each
840  *      pointer referrs to a value that corresponds to a tag specified
841  *      by the iTag array. The size of the data referred to is
842  *      determined by a corresponding element in the iValueSize array.
843  *      The number of elements in this array must not be less than
844  *      iAttributeCount.
845  *
846  *  Result:
847  *    On success, noErr is returned. See MacErrors.h for possible error
848  *    codes.
849  *
850  *  Availability:
851  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
852  *    CarbonLib:        in CarbonLib 1.0 and later
853  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
854  }
ATSUSetAttributesnull855 function ATSUSetAttributes( iStyle: ATSUStyle; iAttributeCount: ItemCount; {const} iTag: {variable-size-array} ATSUAttributeTagPtr; {const} iValueSize: {variable-size-array} ByteCountPtr; {const} iValue: {variable-size-array} ATSUAttributeValuePtrPtr ): OSStatus; external name '_ATSUSetAttributes';
856 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
857 
858 
859 {$ifc not TARGET_CPU_64}
860 {
861  *  ATSUGetAttribute()   *** DEPRECATED ***
862  *
863  *  Deprecated:
864  *    Use CTFontDescriptorCopyAttribute instead.
865  *
866  *  Summary:
867  *    Obtains a single attribute value for a style object.
868  *
869  *  Discussion:
870  *    The ATSUGetAttribute function obtains the value of a specified
871  *    style attribute for a given style object. Before calling
872  *    ATSUGetAttribute, you should call the function
873  *    ATSUGetAllAttributes to obtain an array of nondefault style
874  *    attribute tags and value sizes for the style object. You can then
875  *    pass ATSUGetAttribute the tag and value size for the attribute
876  *    value to obtain. This function may return kATSUNotSetErr for some
877  *    attributes that have not been set to a non-default via a call to
878  *    ATSUSetAttributes.
879  *
880  *  Parameters:
881  *
882  *    iStyle:
883  *      The style object you with to retrieve an attribute value from.
884  *
885  *    iTag:
886  *      The tag you wish to obtain the value of.
887  *
888  *    iExpectedValueSize:
889  *      The size of the buffer pointed to by oValue.
890  *
891  *    oValue:
892  *      On input, a buffer you have allocated to retain the value of
893  *      the specified attribute. On return, the value of the requested
894  *      attribute will be placed here. You may pass NULL for this
895  *      parameter.
896  *
897  *    oActualValueSize:
898  *      On return, the actual number of bytes written to oValue is
899  *      placed here. You may pass NULL for this parameter.
900  *
901  *  Result:
902  *    On success, noErr is returned. See MacErrors.h for possible error
903  *    codes.
904  *
905  *  Availability:
906  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
907  *    CarbonLib:        in CarbonLib 1.0 and later
908  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
909  }
ATSUGetAttributenull910 function ATSUGetAttribute( iStyle: ATSUStyle; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr { can be NULL }; oActualValueSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetAttribute';
911 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
912 
913 
914 {
915  *  ATSUGetAllAttributes()   *** DEPRECATED ***
916  *
917  *  Deprecated:
918  *    Use CTFontDescriptorCopyAttributes instead.
919  *
920  *  Summary:
921  *    Obtains an array of style attribute tags and value sizes for a
922  *    style object.
923  *
924  *  Discussion:
925  *    This function returns information as to which attributes have had
926  *    non-default values set in a particular ATSUStyle object. It will
927  *    also return the size in bytes of the values of these attributes.
928  *    Using this information, you can then call ATSUGetAttribute to
929  *    obtain the value of a given attribute. Typically you use the
930  *    function ATSUGetAllAttributes by calling it twice, as follows:
931  *    (1) Pass a reference to the style object to examine in the iStyle
932  *    parameter, a valid pointer to an ItemCount value in the
933  *    oTagValuePairCount parameter, NULL for the oAttributeInfoArray
934  *    parameter, and 0 for the iTagValuePairArraySize parameter.
935  *    ATSUGetAllAttributes returns the size of the tag and value-size
936  *    arrays in the oTagValuePairCount parameter. (2) Allocate enough
937  *    space for an array of the returned size, then call the
938  *    ATSUGetAllAttributes function again, passing a valid pointer in
939  *    the oAttributeInfoArray parameter. On return, the pointer refers
940  *    to an array of the style attribute tag and value-size pairs
941  *    contained in the style object.
942  *
943  *  Parameters:
944  *
945  *    iStyle:
946  *      The style object you wish to retrieve a list of attribute tags
947  *      from.
948  *
949  *    oAttributeInfoArray:
950  *      On return, an array of ATSUAttributeInfo structures. Each
951  *      structure contains information about an attribute in iStyle
952  *      that has a non-default value. You must allocate space for this
953  *      array. If you are unsure how much space to allocate, you may
954  *      pass NULL for this parameter and use the oTagValuePairCount
955  *      parameter to determine how much space to allocate.
956  *
957  *    iTagValuePairArraySize:
958  *      The size of the array you allocated and are passing in for the
959  *      oAttributeInfoArray parameter.
960  *
961  *    oTagValuePairCount:
962  *      On return, the number of attributes whose information was
963  *      stored in the oAttributeInfoArray parameter.
964  *
965  *  Result:
966  *    On success, noErr is returned. See MacErrors.h for possible error
967  *    codes.
968  *
969  *  Availability:
970  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
971  *    CarbonLib:        in CarbonLib 1.0 and later
972  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
973  }
ATSUGetAllAttributesnull974 function ATSUGetAllAttributes( iStyle: ATSUStyle; oAttributeInfoArray: {variable-size-array} ATSUAttributeInfoPtr { can be NULL }; iTagValuePairArraySize: ItemCount; oTagValuePairCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetAllAttributes';
975 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
976 
977 
978 {
979  *  ATSUClearAttributes()   *** DEPRECATED ***
980  *
981  *  Deprecated:
982  *    Use CoreText API and CFRelease instead.
983  *
984  *  Summary:
985  *    Restores default values to the specified style attributes of a
986  *    style object.
987  *
988  *  Discussion:
989  *    Removes those style attribute values identified by the tag
990  *    constants in the iTag array and replaces them with the default
991  *    values. For a list of possible tags and their default values, see
992  *    the ATSUI documentation, or the definition of ATSUAttributeTag
993  *    elsewhere in this header file. If you specify that any currently
994  *    unset attribute values be removed, ATSUClearAttributes does not
995  *    return an error. Note this function only deals with attributes.
996  *    To remove all previously set style attributes as well as font
997  *    features and font variations from a style object, call the
998  *    function ATSUClearStyle.
999  *
1000  *  Parameters:
1001  *
1002  *    iStyle:
1003  *      A style whose attributes you want to clear.
1004  *
1005  *    iTagCount:
1006  *      The number of tags you are passing in via the iTag parameter.
1007  *      Pass kATSUClearAll to clear all attributes.
1008  *
1009  *    iTag:
1010  *      An array of ATSUAttributeTag indicating which attributes to
1011  *      clear. You may pass NULL for this parameter if you are passing
1012  *      kATSUClearAll for the iTagCount parameter.
1013  *
1014  *  Result:
1015  *    On success, noErr is returned. See MacErrors.h for possible error
1016  *    codes.
1017  *
1018  *  Availability:
1019  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1020  *    CarbonLib:        in CarbonLib 1.0 and later
1021  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1022  }
ATSUClearAttributesnull1023 function ATSUClearAttributes( iStyle: ATSUStyle; iTagCount: ItemCount; {const} iTag: {variable-size-array} ATSUAttributeTagPtr { can be NULL } ): OSStatus; external name '_ATSUClearAttributes';
1024 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1025 
1026 
1027 { ---------------------------------------------------------------------------- }
1028 {  ATSUI basic text layout functions                                           }
1029 { ---------------------------------------------------------------------------- }
1030 {
1031  *  ATSUCreateTextLayout()   *** DEPRECATED ***
1032  *
1033  *  Deprecated:
1034  *    Use CTTypesetterCreateWithAttributedString,
1035  *    CTTypesetterCreateWithAttributedStringAndOptions,
1036  *    CTLineCreateWithAttributedString, CTLineCreateTruncatedLine, or
1037  *    CTLineCreateJustifiedLine instead.
1038  *
1039  *  Summary:
1040  *    Creates an opaque text layout object containing only default text
1041  *    layout attributes.
1042  *
1043  *  Discussion:
1044  *    This function creates a empty text layout object that has no
1045  *    styles or text buffer associated with it. Most ATSUI functions
1046  *    that operate on text layout objects require that the objects be
1047  *    associated with style information and text. To associate style
1048  *    objects and text with an empty text layout object, you can call
1049  *    the functions ATSUSetRunStyle and ATSUSetTextPointerLocation .
1050  *    Or, to create a text layout object and associate style objects
1051  *    and text with it at the same time, you can call the function
1052  *    ATSUCreateTextLayoutWithTextPtr. To provide nondefault line or
1053  *    layout attributes for a text layout object, you can call the
1054  *    functions ATSUSetLineControls or ATSUSetLayoutControls . After
1055  *    setting text attributes, call ATSUDrawText to draw the text. Text
1056  *    layout objects are readily reusable and should be cached for
1057  *    later use, if possible. You can reuse a text layout object even
1058  *    if the text associated with it is altered. Call the functions
1059  *    ATSUSetTextPointerLocation, ATSUTextDeleted, or ATSUTextInserted
1060  *    to manage the altered text.
1061  *
1062  *  Parameters:
1063  *
1064  *    oTextLayout:
1065  *      On return, the value refers to an empty text layout object.
1066  *
1067  *  Result:
1068  *    On success, noErr is returned. See MacErrors.h for possible error
1069  *    codes.
1070  *
1071  *  Availability:
1072  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1073  *    CarbonLib:        in CarbonLib 1.0 and later
1074  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1075  }
ATSUCreateTextLayoutnull1076 function ATSUCreateTextLayout( var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateTextLayout';
1077 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1078 
1079 
1080 {
1081  *  ATSUCreateAndCopyTextLayout()   *** DEPRECATED ***
1082  *
1083  *  Deprecated:
1084  *    Use CTTypesetterCreateWithAttributedString,
1085  *    CTTypesetterCreateWithAttributedStringAndOptions,
1086  *    CTLineCreateWithAttributedString, CTLineCreateTruncatedLine, or
1087  *    CTLineCreateJustifiedLine instead.
1088  *
1089  *  Summary:
1090  *    Creates a copy of a text layout object.
1091  *
1092  *  Discussion:
1093  *    This function creates a copy of the source text layout object's
1094  *    style runs (including references to the associated text buffer
1095  *    and style objects), line attributes, layout attributes, and
1096  *    layout caches. ATSUCreateAndCopyTextLayout does not copy
1097  *    reference constants. To create a text layout object without
1098  *    copying a source object, you can the function
1099  *    ATSUCreateTextLayout or the function
1100  *    ATSUCreateTextLayoutWithTextPtr.
1101  *
1102  *  Parameters:
1103  *
1104  *    iTextLayout:
1105  *      The layout to be copied.
1106  *
1107  *    oTextLayout:
1108  *      On return, a reference to a layout object which is a copy of
1109  *      iTextLayout.
1110  *
1111  *  Result:
1112  *    On success, noErr is returned. See MacErrors.h for possible error
1113  *    codes.
1114  *
1115  *  Availability:
1116  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1117  *    CarbonLib:        in CarbonLib 1.0 and later
1118  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
1119  }
ATSUCreateAndCopyTextLayoutnull1120 function ATSUCreateAndCopyTextLayout( iTextLayout: ATSUTextLayout; var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateAndCopyTextLayout';
1121 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1122 
1123 
1124 {$endc} {not TARGET_CPU_64}
1125 
1126 {
1127  *  ATSUCreateTextLayoutWithTextPtr()   *** DEPRECATED ***
1128  *
1129  *  Deprecated:
1130  *    Use CTTypesetterCreateWithAttributedString,
1131  *    CTTypesetterCreateWithAttributedStringAndOptions,
1132  *    CTLineCreateWithAttributedString, CTLineCreateTruncatedLine, or
1133  *    CTLineCreateJustifiedLine instead.
1134  *
1135  *  Summary:
1136  *    Creates an opaque text layout object containing default text
1137  *    layout attributes as well as associated text and text styles.
1138  *
1139  *  Discussion:
1140  *    This function creates a text layout object and associates the
1141  *    specified text buffer and style runs with it. All layout
1142  *    attributes are set to their default values. To provide nondefault
1143  *    line or layout attributes for a text layout object, you can call
1144  *    the functions ATSUSetLineControls or ATSUSetLayoutControls. After
1145  *    setting text attributes, call ATSUDrawText to draw the text.
1146  *    Because the only way that ATSUI interacts with text is via the
1147  *    memory references you associate with a text layout object, you
1148  *    are responsible for keeping these references updated through use
1149  *    of the functions ATSUTextInserted, ATSUTextDeleted,
1150  *    ATSUTextMoved, and ATSUSetTextPointerLocation. Note that, because
1151  *    ATSUI objects retain state information, doing superfluous calling
1152  *    can degrade performance. For example, you could call
1153  *    ATSUSetTextPointerLocation rather than ATSUTextInserted when the
1154  *    user inserts text, but there would be a performance penalty, as
1155  *    all the layout caches are flushed when you call
1156  *    ATSUSetTextPointerLocation , rather than just the affected ones.
1157  *    Text layout objects are readily reusable and should themselves be
1158  *    cached for later use, if possible. Text objects are thread-safe
1159  *    starting with ATSUI version 2.4.
1160  *
1161  *  Parameters:
1162  *
1163  *    iText:
1164  *      A text buffer containing UTF-16�encoded text. ATSUI associates
1165  *      this buffer with the new text layout object and analyzes the
1166  *      complete text of the buffer when obtaining the layout context
1167  *      for the current text range. Thus, for paragraph-format text, if
1168  *      you specify a buffer containing less than a complete paragraph,
1169  *      some of ATSUI's layout results are not guaranteed to be
1170  *      accurate. For example, with a buffer of less than a full
1171  *      paragraph, ATSUI can neither reliably obtain the context for
1172  *      bidirectional processing nor reliably generate accent
1173  *      attachments and ligature formations for Roman text.
1174  *
1175  *    iTextOffset:
1176  *      The offset from the beginning of the text buffer to the first
1177  *      character of the range to include in the layout. To indicate
1178  *      that the specified text range starts at the beginning of the
1179  *      text buffer, you can pass the constant kATSUFromTextBeginning.
1180  *      To specify the entire text buffer, pass kATSUFromTextBeginning
1181  *      in this parameter and kATSUToTextEnd in the iTextLength
1182  *      parameter. For best results, use one layout for each paragraph
1183  *      within the text buffer.
1184  *
1185  *    iTextLength:
1186  *      The length of the text range. Note that the sum of iTextOffset
1187  *      and iTextLength must be less than or equal to the value of the
1188  *      iTextTotalLength parameter. If you want the range of text to
1189  *      extend to the end of the text buffer, you can pass the constant
1190  *      kATSUToTextEnd. For best results, use one layout for each
1191  *      paragraph within the text buffer.
1192  *
1193  *    iTextTotalLength:
1194  *      The length of the entire text buffer referred to by iText. This
1195  *      value should be greater than or equal to the range of text
1196  *      defined by the iTextLength parameter.
1197  *
1198  *    iNumberOfRuns:
1199  *      The number of text style runs you want to define within the
1200  *      overall text range. The number of style objects and style run
1201  *      lengths passed in the iStyles and iRunLengths parameters,
1202  *      respectively, should be equal to the number of runs specified
1203  *      here.
1204  *
1205  *    iRunLengths:
1206  *      An array providing ATSUI with the lengths of each of the text's
1207  *      style runs. You can pass kATSUToTextEnd for the last style run
1208  *      length if you want the style run to extend to the end of the
1209  *      text range. If the sum of the style run lengths is less than
1210  *      the total length of the text range, the remaining characters
1211  *      are assigned to the last style run.
1212  *
1213  *    iStyles:
1214  *      An array of styles, each corresponding to a style run defined
1215  *      in iRunLengths. The same ATSUStyle object may be referred to
1216  *      more than once in this array. The number of elements in this
1217  *      array must be equal to the value specified by the iNumberOfRuns
1218  *      parameter.
1219  *
1220  *    oTextLayout:
1221  *      A valid pointer to an ATSUTextLayout value. On return, the
1222  *      value refers to the newly created text layout object.
1223  *
1224  *  Result:
1225  *    On success, noErr is returned. See MacErrors.h for possible error
1226  *    codes.
1227  *
1228  *  Availability:
1229  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
1230  *    CarbonLib:        in CarbonLib 1.0 and later
1231  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1232  }
ATSUCreateTextLayoutWithTextPtrnull1233 function ATSUCreateTextLayoutWithTextPtr( iText: ConstUniCharArrayPtr; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount; iNumberOfRuns: ItemCount; {const} iRunLengths: {variable-size-array} UniCharCountPtr; iStyles: {variable-size-array} ATSUStylePtr; var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateTextLayoutWithTextPtr';
1234 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1235 
1236 
1237 {
1238  *  ATSUClearLayoutCache()   *** DEPRECATED ***
1239  *
1240  *  Deprecated:
1241  *    Use CoreText API and CFRelease instead.
1242  *
1243  *  Summary:
1244  *    Clears the layout cache of a line or an entire text layout object.
1245  *
1246  *  Discussion:
1247  *    The layout cache contains all the layout information ATSUI
1248  *    calculates and needs to draw a range of text in a text layout
1249  *    object. This includes caret positions, the memory locations of
1250  *    glyphs, and other information needed to lay out the glyphs. ATSUI
1251  *    uses information in the layout cache to avoid laying out the text
1252  *    again, thereby improving performance. When you clear the layout
1253  *    cache of a line or block of text, ATSUI takes longer to redraw a
1254  *    line, since it must perform the calculations that support glyph
1255  *    layout again. You should call the function ATSUClearLayoutCache
1256  *    when you need to decrease the amount of memory your application
1257  *    uses. This function reclaims memory at the cost of optimal
1258  *    performance. By default, the ATSUClearLayoutCache function
1259  *    removes the layout cache of a single line. To clear the layout
1260  *    cache for multiple lines, you should call ATSUClearLayoutCache
1261  *    for each line. To clear the layout cache of an entire text layout
1262  *    object, pass the constant kATSUFromTextBeginning in the
1263  *    iLineStart parameter. Note that ATSUClearLayoutCache does not
1264  *    produce a function error if lines do not have a layout cache. The
1265  *    ATSUClearLayoutCache function flushes the layout cache but does
1266  *    not alter previously set text layout attributes, soft line break
1267  *    positions, or the text memory location. If you do not want to
1268  *    retain these values, you should dispose of the text layout object
1269  *    by calling the ATSUDisposeTextLayout function.
1270  *
1271  *  Parameters:
1272  *
1273  *    iTextLayout:
1274  *      The layout for which to clear the layout caches.
1275  *
1276  *    iLineStart:
1277  *      The offset from the beginning of the text buffer to the
1278  *      beginning of the line for which to discard the layout cache. If
1279  *      the range of text spans multiple lines, you should call
1280  *      ATSUClearLayoutCache for each line, passing the offset
1281  *      corresponding to the beginning of the new line to draw with
1282  *      each call. To clear the layout cache of the entire text layout
1283  *      object, you can pass the constant kATSUFromTextBeginning.
1284  *
1285  *  Result:
1286  *    On success, noErr is returned. See MacErrors.h for possible error
1287  *    codes.
1288  *
1289  *  Availability:
1290  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
1291  *    CarbonLib:        in CarbonLib 1.0 and later
1292  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
1293  }
ATSUClearLayoutCachenull1294 function ATSUClearLayoutCache( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset ): OSStatus; external name '_ATSUClearLayoutCache';
1295 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1296 
1297 
1298 {
1299  *  ATSUDisposeTextLayout()   *** DEPRECATED ***
1300  *
1301  *  Deprecated:
1302  *    Use CoreText API and CFRelease instead.
1303  *
1304  *  Summary:
1305  *    Disposes of the memory associated with a text layout object.
1306  *
1307  *  Discussion:
1308  *    This function frees the memory associated with the specified text
1309  *    layout object and its internal structures, including line and
1310  *    layout control attributes, style runs, and soft line breaks.
1311  *    ATSUDisposeTextLayout does not dispose of any memory that may be
1312  *    allocated for the text buffer, style objects, or reference
1313  *    constants associated with the text layout object. You are
1314  *    responsible for doing so. For best performance, text layout
1315  *    objects are readily reusable and should be cached for later use,
1316  *    if possible. You can reuse a text layout object even if the text
1317  *    associated with it is altered. Call the functions
1318  *    ATSUSetTextPointerLocation, ATSUTextDeleted, or ATSUTextInserted
1319  *    to manage the altered text, rather than disposing of the text
1320  *    layout object and creating a new one.
1321  *
1322  *  Parameters:
1323  *
1324  *    iTextLayout:
1325  *      The layout object to dispose of.
1326  *
1327  *  Result:
1328  *    On success, noErr is returned. See MacErrors.h for possible error
1329  *    codes.
1330  *
1331  *  Availability:
1332  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
1333  *    CarbonLib:        in CarbonLib 1.0 and later
1334  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1335  }
ATSUDisposeTextLayoutnull1336 function ATSUDisposeTextLayout( iTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUDisposeTextLayout';
1337 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1338 
1339 
1340 {
1341  *  ATSUSetTextLayoutRefCon()   *** DEPRECATED ***
1342  *
1343  *  Deprecated:
1344  *    Use CFAttributedStringSetAttributes instead.
1345  *
1346  *  Summary:
1347  *    Sets application-specific data for a text layout object.
1348  *
1349  *  Discussion:
1350  *    This function associates a reference constant (that is,
1351  *    application-specific data) with a text layout object. You might
1352  *    typically use ATSUSetTextLayoutRefCon to track user preferences
1353  *    that can effect layout, for example. If you copy or clear a text
1354  *    layout object containing a reference constant, the reference
1355  *    constant is not copied or removed. When you dispose of a text
1356  *    layout object that contains a reference constant, you are
1357  *    responsible for freeing any memory allocated for the reference
1358  *    constant. Calling the function ATSUDisposeTextLayout does not do
1359  *    so.
1360  *
1361  *  Parameters:
1362  *
1363  *    iTextLayout:
1364  *      A layout for which you wish to set a reference constant.
1365  *
1366  *    iRefCon:
1367  *      Any arbitrary 32-bit value you wish to store in association
1368  *      with iTextLayout.
1369  *
1370  *  Result:
1371  *    On success, noErr is returned. See MacErrors.h for possible error
1372  *    codes.
1373  *
1374  *  Availability:
1375  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
1376  *    CarbonLib:        in CarbonLib 1.0 and later
1377  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1378  }
ATSUSetTextLayoutRefConnull1379 function ATSUSetTextLayoutRefCon( iTextLayout: ATSUTextLayout; iRefCon: URefCon ): OSStatus; external name '_ATSUSetTextLayoutRefCon';
1380 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1381 
1382 
1383 {$ifc not TARGET_CPU_64}
1384 {
1385  *  ATSUGetTextLayoutRefCon()   *** DEPRECATED ***
1386  *
1387  *  Deprecated:
1388  *    Use CFAttributedStringSetAttributes instead.
1389  *
1390  *  Summary:
1391  *    Obtains application-specific data for a text layout object.
1392  *
1393  *  Discussion:
1394  *    This function obtains a reference constant (that is,
1395  *    application-specific data) associated with a text layout object.
1396  *    To associate a reference constant with a text layout object, call
1397  *    the function ATSUSetTextLayoutRefCon.
1398  *
1399  *  Parameters:
1400  *
1401  *    iTextLayout:
1402  *      A layout for which you wish to retreive the reference constant.
1403  *
1404  *    oRefCon:
1405  *      On return, the reference constant associated with iTextLayout.
1406  *
1407  *  Result:
1408  *    On success, noErr is returned. See MacErrors.h for possible error
1409  *    codes.
1410  *
1411  *  Availability:
1412  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1413  *    CarbonLib:        in CarbonLib 1.0 and later
1414  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1415  }
ATSUGetTextLayoutRefConnull1416 function ATSUGetTextLayoutRefCon( iTextLayout: ATSUTextLayout; var oRefCon: URefCon ): OSStatus; external name '_ATSUGetTextLayoutRefCon';
1417 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1418 
1419 
1420 { ---------------------------------------------------------------------------- }
1421 {  ATSUI text buffer manipulation                                              }
1422 { ---------------------------------------------------------------------------- }
1423 {
1424  *  ATSUSetTextPointerLocation()   *** DEPRECATED ***
1425  *
1426  *  Deprecated:
1427  *    Use CoreText API instead.
1428  *
1429  *  Summary:
1430  *    Associates a text buffer with a text layout object or updates
1431  *    previously associated text.
1432  *
1433  *  Discussion:
1434  *    For ATSUI to render your text, you must associate the text with
1435  *    both a text layout object and style information. Some functions,
1436  *    such as ATSUCreateTextLayoutWithTextPtr, create a text layout
1437  *    object and associate text with it concurrently. However, if you
1438  *    use the function ATSUCreateTextLayout to create a text layout
1439  *    object, you must assign text to the object prior to attempting
1440  *    most ATSUI operations. You can use the function
1441  *    ATSUSetTextPointerLocation to associate text with a layout
1442  *    object. When you call this function, you are both assigning a
1443  *    text buffer to a text layout object and specifying the current
1444  *    text subrange within the buffer to include in the layout. If
1445  *    there is already text associated with a text layout object,
1446  *    calling ATSUSetTextPointerLocation overrides the previously
1447  *    associated text, as well as clearing the object's layout caches.
1448  *    You would typically only call this function for a text layout
1449  *    object with existing associated text if either (a) both the
1450  *    buffer itself is relocated and a subrange of the buffer's text is
1451  *    deleted or inserted or (b) when associating an entirely different
1452  *    buffer with a text layout object. Note that, because ATSUI
1453  *    objects retain state, doing superfluous calling can degrade
1454  *    performance. For example, you could call
1455  *    ATSUSetTextPointerLocation rather than ATSUTextInserted when the
1456  *    user simply inserts a subrange of text within a text buffer, but
1457  *    there would be a performance penalty, as all the layout caches
1458  *    are flushed by ATSUSetTextPointerLocation, rather than just the
1459  *    affected ones. Similarly, you should not call
1460  *    ATSUSetTextPointerLocation, when an entire text buffer associated
1461  *    with a text layout object is relocated, but no other changes have
1462  *    occurred that would affect the buffer's current subrange.
1463  *    Instead, you should call ATSUTextMoved, which is a more focused
1464  *    function and therefore more efficient. After associating text
1465  *    with a text layout object, use ATSUSetRunStyle to associate style
1466  *    information with the text. You can then call the function
1467  *    ATSUDrawText to display the text or a subrange of the text.
1468  *
1469  *  Parameters:
1470  *
1471  *    iTextLayout:
1472  *      The layout object for which you wish to associate a text buffer.
1473  *
1474  *    iText:
1475  *      A pointer to a buffer of Unicode text in UTF-16 format. This is
1476  *      the text that will be associated with iTextLayout.
1477  *
1478  *    iTextOffset:
1479  *      The starting offset of the subrange of the text buffer you wish
1480  *      to associate with iTextLayout. To indicate that the specified
1481  *      text range starts at the beginning of the text buffer, you can
1482  *      pass the constant kATSUFromTextBeginning . To specify the
1483  *      entire text buffer, pass kATSUFromTextBeginning in this
1484  *      parameter and kATSUToTextEnd in the iTextLength parameter.
1485  *
1486  *    iTextLength:
1487  *      The length of the subrage of the text buffer you wish to
1488  *      associate with iTextLayout. Note that the sum of iTextOffset
1489  *      and iTextLength must be less than or equal to the value of the
1490  *      iTextTotalLength parameter. If you want the range of text to
1491  *      extend to the end of the text buffer, you can pass the constant
1492  *      kATSUToTextEnd.
1493  *
1494  *    iTextTotalLength:
1495  *      The length of the entire text buffer. This value should be
1496  *      greater than or equal to the range of text defined by the
1497  *      iTextLength parameter.
1498  *
1499  *  Result:
1500  *    On success, noErr is returned. See MacErrors.h for possible error
1501  *    codes.
1502  *
1503  *  Availability:
1504  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1505  *    CarbonLib:        in CarbonLib 1.0 and later
1506  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1507  }
ATSUSetTextPointerLocationnull1508 function ATSUSetTextPointerLocation( iTextLayout: ATSUTextLayout; iText: ConstUniCharArrayPtr; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount ): OSStatus; external name '_ATSUSetTextPointerLocation';
1509 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1510 
1511 
1512 {
1513  *  ATSUGetTextLocation()   *** DEPRECATED ***
1514  *
1515  *  Deprecated:
1516  *    Use CoreText API instead.
1517  *
1518  *  Summary:
1519  *    Returns information about the Unicode text buffer associated with
1520  *    a layout.
1521  *
1522  *  Discussion:
1523  *    For a given layout, ATSUGetTextLocation will return information
1524  *    about the Unicode text buffer associated with it, including its
1525  *    memory location, its size, and whether it is stored in a handle.
1526  *    Note that since a layout may refer to a subrange within a text
1527  *    buffer, parameters defining this subrange are included. oOffset
1528  *    and oTextLength give information about the subrange, while oText
1529  *    and oTextTotalLength give information about the entire text
1530  *    buffer. You may pass NULL for any parameters you are not
1531  *    interested in. Only iTextLayout is required.
1532  *
1533  *  Parameters:
1534  *
1535  *    iTextLayout:
1536  *      A text layout whose text buffer you want information regarding.
1537  *
1538  *    oText:
1539  *      A pointer to data of any type. On return, the pointer is set to
1540  *      either a pointer or a handle that refers to the text buffer for
1541  *      the specified text layout object.
1542  *
1543  *    oTextIsStoredInHandle:
1544  *      On return, the value is set to true if the text buffer referred
1545  *      to by the oText parameter is accessed by a handle; if false, a
1546  *      pointer.
1547  *
1548  *    oOffset:
1549  *      On return, the offset from the beginning of the text buffer to
1550  *      the first character of the layout's current text range.
1551  *
1552  *    oTextLength:
1553  *      On return, the value specifies the length of the layout's
1554  *      current text range.
1555  *
1556  *    oTextTotalLength:
1557  *      On return, the total length of the text buffer. Note this is
1558  *      not necessarily the same as the length of the layout's current
1559  *      range. (A layout may refer to only a subrange within a text
1560  *      buffer.)
1561  *
1562  *  Result:
1563  *    On success, noErr is returned. See MacErrors.h for possible error
1564  *    codes.
1565  *
1566  *  Availability:
1567  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1568  *    CarbonLib:        in CarbonLib 1.0 and later
1569  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1570  }
ATSUGetTextLocationnull1571 function ATSUGetTextLocation( iTextLayout: ATSUTextLayout; oText: UnivPtrPtr { can be NULL }; oTextIsStoredInHandle: BooleanPtr { can be NULL }; oOffset: UniCharArrayOffsetPtr { can be NULL }; oTextLength: UniCharCountPtr { can be NULL }; oTextTotalLength: UniCharCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetTextLocation';
1572 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1573 
1574 
1575 {
1576  *  ATSUTextDeleted()   *** DEPRECATED ***
1577  *
1578  *  Deprecated:
1579  *    Use CoreText API instead.
1580  *
1581  *  Summary:
1582  *    Informs ATSUI of the location and length of a text deletion.
1583  *
1584  *  Discussion:
1585  *    When you call the ATSUTextDeleted function to inform ATSUI of a
1586  *    text deletion, it shortens the style run(s) containing the
1587  *    deleted text by the amount of the deletion. If a style run
1588  *    corresponds entirely to a range of deleted text, that style run
1589  *    is removed. If the deletion point is between two style runs, the
1590  *    first style run is shortened (or removed). The ATSUTextDeleted
1591  *    function also shortens the total length of the text buffer
1592  *    containing the deleted text by the amount of the deletion. That
1593  *    is, it shifts the memory location of the text following the
1594  *    deleted text by iDeletedRangeLength .ATSUTextDeleted also removes
1595  *    any soft line breaks that fall within the deleted text and
1596  *    updates affected drawing caches. The ATSUTextDeleted function
1597  *    does not change the actual memory location of the affected text.
1598  *    You are responsible for deleting the corresponding text is from
1599  *    the text buffer. You are also responsible for calling the
1600  *    function ATSUDisposeStyle to dispose of the memory associated
1601  *    with any style runs that have been removed. Note that calling the
1602  *    function ATSUTextDeleted automatically removes previously-set
1603  *    soft line breaks if the line breaks are within the range of text
1604  *    that is deleted.
1605  *
1606  *  Parameters:
1607  *
1608  *    iTextLayout:
1609  *      The text layout containing the deleted text.
1610  *
1611  *    iDeletedRangeStart:
1612  *      The starting location of the deleted text. To specify a
1613  *      deletion point at the beginning of the text buffer, you can
1614  *      pass the constant kATSUFromTextBeginning. To specify that the
1615  *      entire text buffer has been deleted, pass
1616  *      kATSUFromTextBeginning in this parameter and kATSUToTextEnd in
1617  *      the iDeletedRangeLength parameter.
1618  *
1619  *    iDeletedRangeLength:
1620  *      The length of the deleted text. To specify a deletion length
1621  *      extending to the end of the text buffer, you can pass the
1622  *      constant kATSUToTextEnd.
1623  *
1624  *  Result:
1625  *    On success, noErr is returned. See MacErrors.h for possible error
1626  *    codes.
1627  *
1628  *  Availability:
1629  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1630  *    CarbonLib:        in CarbonLib 1.0 and later
1631  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1632  }
ATSUTextDeletednull1633 function ATSUTextDeleted( iTextLayout: ATSUTextLayout; iDeletedRangeStart: UniCharArrayOffset; iDeletedRangeLength: UniCharCount ): OSStatus; external name '_ATSUTextDeleted';
1634 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1635 
1636 
1637 {
1638  *  ATSUTextInserted()   *** DEPRECATED ***
1639  *
1640  *  Deprecated:
1641  *    Use CoreText API instead.
1642  *
1643  *  Summary:
1644  *    Informs ATSUI of the location and length of a text insertion.
1645  *
1646  *  Discussion:
1647  *    When you call the ATSUTextInserted function to inform ATSUI of a
1648  *    text insertion, it extends the style run containing the insertion
1649  *    point by the amount of the inserted text. If the insertion point
1650  *    is between two style runs, the first style run is extended to
1651  *    include the new text. The ATSUTextInserted function also extends
1652  *    the total length of the text buffer containing the inserted text
1653  *    by the amount of the inserted text. That is, it shifts the memory
1654  *    location of the text following the inserted text by
1655  *    iInsertionLength. ATSUTextInserted then updates drawing caches.
1656  *    Note that the ATSUTextInserted function does not change the
1657  *    actual memory location of the inserted text. You are responsible
1658  *    for placing the inserted text into the text buffer at the
1659  *    appropriate location. The ATSUTextInserted function does not
1660  *    insert style runs or line breaks; to do so, call the functions
1661  *    ATSUSetRunStyle and ATSUSetSoftLineBreak, respectively. Break
1662  *    line operations should be redone after you call ATSUTextInserted.
1663  *
1664  *  Parameters:
1665  *
1666  *    iTextLayout:
1667  *      The text layout in which the text insertion is taking place.
1668  *
1669  *    iInsertionLocation:
1670  *      The offset corresponding to the beginning of the inserted text.
1671  *
1672  *    iInsertionLength:
1673  *      The length of the inserted text.
1674  *
1675  *  Result:
1676  *    On success, noErr is returned. See MacErrors.h for possible error
1677  *    codes.
1678  *
1679  *  Availability:
1680  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1681  *    CarbonLib:        in CarbonLib 1.0 and later
1682  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1683  }
ATSUTextInsertednull1684 function ATSUTextInserted( iTextLayout: ATSUTextLayout; iInsertionLocation: UniCharArrayOffset; iInsertionLength: UniCharCount ): OSStatus; external name '_ATSUTextInserted';
1685 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1686 
1687 
1688 {$endc} {not TARGET_CPU_64}
1689 
1690 {
1691  *  ATSUTextMoved()   *** DEPRECATED ***
1692  *
1693  *  Deprecated:
1694  *    Use CoreText API instead.
1695  *
1696  *  Summary:
1697  *    Informs ATSUI of the new memory location of relocated text.
1698  *
1699  *  Discussion:
1700  *    You should call the ATSUTextMoved function when a range of text
1701  *    consisting of less than an entire text buffer has been moved. The
1702  *    ATSUTextMoved function informs ATSUI of the new memory location
1703  *    of the text. You are responsible for moving the text. The text
1704  *    buffer should remain otherwise unchanged.
1705  *
1706  *  Parameters:
1707  *
1708  *    iTextLayout:
1709  *      The text layout containing the moved text.
1710  *
1711  *    iNewLocation:
1712  *      The new memory location of the moved text.
1713  *
1714  *  Result:
1715  *    On success, noErr is returned. See MacErrors.h for possible error
1716  *    codes.
1717  *
1718  *  Availability:
1719  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
1720  *    CarbonLib:        in CarbonLib 1.0 and later
1721  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1722  }
ATSUTextMovednull1723 function ATSUTextMoved( iTextLayout: ATSUTextLayout; iNewLocation: ConstUniCharArrayPtr ): OSStatus; external name '_ATSUTextMoved';
1724 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1725 
1726 
1727 { ---------------------------------------------------------------------------- }
1728 {  ATSUI layout controls                                                       }
1729 { ---------------------------------------------------------------------------- }
1730 {$ifc not TARGET_CPU_64}
1731 {
1732  *  ATSUCopyLayoutControls()   *** DEPRECATED ***
1733  *
1734  *  Deprecated:
1735  *    Use CTParagraphStyleCreate or CTLineGetPenOffsetForFlush instead.
1736  *
1737  *  Summary:
1738  *    Copies all layout control attribute settings from a source text
1739  *    layout object to a destination text layout object.
1740  *
1741  *  Discussion:
1742  *    This function copies all layout control attribute values to a
1743  *    destination text layout object from a source text layout object,
1744  *    including any default (unset) values in the source object. For a
1745  *    list of tags and their default values, see the definition of
1746  *    ATSUAttributeTag. Reference constants and the contents of memory
1747  *    referenced by pointers within custom layout attributes are not
1748  *    copied. You are responsible for ensuring that this memory remains
1749  *    valid until both the source and destination text layout objects
1750  *    are disposed. To copy line control attribute values from one text
1751  *    layout object to another, call the function ATSUCopyLineControls.
1752  *
1753  *  Parameters:
1754  *
1755  *    iSourceTextLayout:
1756  *      The text layout to copy layout controls from.
1757  *
1758  *    iDestTextLayout:
1759  *      The text layout to copy layout controls to.
1760  *
1761  *  Result:
1762  *    On success, noErr is returned. See MacErrors.h for possible error
1763  *    codes.
1764  *
1765  *  Availability:
1766  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1767  *    CarbonLib:        in CarbonLib 1.0 and later
1768  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1769  }
ATSUCopyLayoutControlsnull1770 function ATSUCopyLayoutControls( iSourceTextLayout: ATSUTextLayout; iDestTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCopyLayoutControls';
1771 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1772 
1773 
1774 {$endc} {not TARGET_CPU_64}
1775 
1776 {
1777  *  ATSUSetLayoutControls()   *** DEPRECATED ***
1778  *
1779  *  Deprecated:
1780  *    Use CoreText API and CFAttributedStringSetAttributes instead.
1781  *
1782  *  Summary:
1783  *    Sets layout control attribute values in a text layout object.
1784  *
1785  *  Discussion:
1786  *    When you use ATSUI to image your text, you can control the text's
1787  *    display and formatting at a number of different levels: layout,
1788  *    line, and run. The level affected by this function is the layout
1789  *    level, which is that of the entire text range associated with
1790  *    your text layout object. Attributes at this level affect the
1791  *    width of the text area from margin to margin, the alignment of
1792  *    the text, its justification, rotation, and direction, as well as
1793  *    other layout options. See ATSUSetLineControls for information
1794  *    about controling text and the line level. Similar to style
1795  *    attributes, you use a "triple" to specify a line or layout
1796  *    control attribute. That is, (1) an attribute tag, (2) the size
1797  *    (in bytes) of the attribute value, and (3) the value of the
1798  *    attribute it sets. Attribute tags are constants supplied by
1799  *    ATSUI. Attribute values may be a scalar, a structure, or a
1800  *    pointer. And as with style attributes, you can also create a
1801  *    custom attribute for a line or layout attribute for which ATSUI
1802  *    does not provide a tag. For a list of layout control tags defined
1803  *    by ATSUI and their default values, see the definition of
1804  *    ATSUAttributeTag.
1805  *
1806  *  Parameters:
1807  *
1808  *    iTextLayout:
1809  *      The text layout in which to set layout-level controls.
1810  *
1811  *    iAttributeCount:
1812  *      The number of attributes to set. This value should correspond
1813  *      to the number of elements in the iTag, iValueSize, and iValue
1814  *      arrays.
1815  *
1816  *    iTag:
1817  *      An array of attribute tags to set. For a list of layout control
1818  *      tags defined by ATSUI and their default values, see the
1819  *      definition of ATSUAttributeTag.
1820  *
1821  *    iValueSize:
1822  *      An array of values indicating the sizes of the values pointed
1823  *      to by the elements in the iValue array.
1824  *
1825  *    iValue:
1826  *      An array of attribute value pointers. Each value in the array
1827  *      must correspond to a tag in the iTag array and be a legal value
1828  *      for that tag.
1829  *
1830  *  Result:
1831  *    On success, noErr is returned. See MacErrors.h for possible error
1832  *    codes.
1833  *
1834  *  Availability:
1835  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
1836  *    CarbonLib:        in CarbonLib 1.0 and later
1837  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1838  }
ATSUSetLayoutControlsnull1839 function ATSUSetLayoutControls( iTextLayout: ATSUTextLayout; iAttributeCount: ItemCount; {const} iTag: {variable-size-array} ATSUAttributeTagPtr; {const} iValueSize: {variable-size-array} ByteCountPtr; {const} iValue: {variable-size-array} ATSUAttributeValuePtrPtr ): OSStatus; external name '_ATSUSetLayoutControls';
1840 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1841 
1842 
1843 {$ifc not TARGET_CPU_64}
1844 {
1845  *  ATSUGetLayoutControl()   *** DEPRECATED ***
1846  *
1847  *  Deprecated:
1848  *    Use CoreText API and CFAttributedStringGetAttributes instead.
1849  *
1850  *  Summary:
1851  *    Obtains a single layout control attribute value for a text layout
1852  *    object.
1853  *
1854  *  Discussion:
1855  *    Before calling ATSUGetLayoutControl, you should call the function
1856  *    ATSUGetAllLayoutControls to obtain an array of nondefault layout
1857  *    control attribute tags and value sizes for the text layout
1858  *    object. You can then pass the tag and value size for the
1859  *    attribute value to obtain to ATSUGetLayoutControl. Typically you
1860  *    use the function ATSUGetLayoutControl by calling it twice, as
1861  *    follows: (1) Pass a reference to the text layout object to
1862  *    examine in the iTextLayout parameter, NULL for the oValue
1863  *    parameter, 0 for the iExpectedValueSize parameter.
1864  *    ATSUGetLayoutControl returns the actual size of the attribute
1865  *    value in the oActualValueSize parameter. (2) Allocate enough
1866  *    space for an array of the returned size, then call the
1867  *    ATSUGetLayoutControl function again, passing a valid pointer in
1868  *    the oValue parameter. On return, the pointer refers to the actual
1869  *    attribute value contained in the text layout object. For a list
1870  *    of layout control tags defined by ATSUI and their default values,
1871  *    see the definition of ATSUAttributeTag.
1872  *
1873  *  Parameters:
1874  *
1875  *    iTextLayout:
1876  *      The text layout for which you wish to obtain a single layout
1877  *      control value.
1878  *
1879  *    iTag:
1880  *      An attribute tag specifying the layout control value you wish
1881  *      to obtain. For a list of layout control tags defined by ATSUI
1882  *      and their default values, see the definition of
1883  *      ATSUAttributeTag.
1884  *
1885  *    iExpectedValueSize:
1886  *      The size in bytes of the buffer you have allocated for the
1887  *      oValue parameter.
1888  *
1889  *    oValue:
1890  *      On return, the value assocaited with the layout tag specified
1891  *      by the iTag parameter.
1892  *
1893  *    oActualValueSize:
1894  *      On return, the value contains the actual size (in bytes) of the
1895  *      attribute value. You should examine this parameter if you are
1896  *      unsure of the size of the attribute value being obtained, as in
1897  *      the case of custom layout control attributes.
1898  *
1899  *  Result:
1900  *    On success, noErr is returned. See MacErrors.h for possible error
1901  *    codes.
1902  *
1903  *  Availability:
1904  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1905  *    CarbonLib:        in CarbonLib 1.0 and later
1906  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1907  }
ATSUGetLayoutControlnull1908 function ATSUGetLayoutControl( iTextLayout: ATSUTextLayout; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr { can be NULL }; oActualValueSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetLayoutControl';
1909 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1910 
1911 
1912 {
1913  *  ATSUGetAllLayoutControls()   *** DEPRECATED ***
1914  *
1915  *  Deprecated:
1916  *    Use CoreText API and CFAttributedStringGetAttributes instead.
1917  *
1918  *  Summary:
1919  *    Obtains an array of non-default layout control attribute tags and
1920  *    value sizes for a text layout object.
1921  *
1922  *  Discussion:
1923  *    This function function obtains all nondefault layout control
1924  *    attribute tags and their values sizes for a text layout object.
1925  *    You can pass a tag and value size pair obtained from
1926  *    ATSUGetAllLayoutControls to the function ATSUGetLayoutControl to
1927  *    determine the corresponding attribute value. Typically you use
1928  *    the function ATSUGetAllLayoutControls by calling it twice, as
1929  *    follows: (1) Pass a reference to the text layout object to
1930  *    examine in the iTextLayout parameter, NULL for the
1931  *    oAttributeInfoArray parameter, a pointer to an ItemCount value in
1932  *    the oTagValuePairCount parameter, and 0 for the
1933  *    iTagValuePairArraySize parameter. ATSUGetAllLayoutControls
1934  *    returns the size of the tag and value size arrays in the
1935  *    oTagValuePairCount parameter. (2) Allocate enough space for an
1936  *    array of the returned size, then call the
1937  *    ATSUGetAllLayoutControls function again, passing a valid pointer
1938  *    in the oAttributeInfoArray parameter. On return, the pointer
1939  *    refers to an array of the layout control attribute tag and value
1940  *    size pairs contained in the text layout object.
1941  *
1942  *  Parameters:
1943  *
1944  *    iTextLayout:
1945  *      The layout for which you wish to obtain the set of non-default
1946  *      layout tags.
1947  *
1948  *    oAttributeInfoArray:
1949  *      On return, this array contains pairs of tags and value sizes
1950  *      for the object's layout control attributes that are not at
1951  *      default values. If you are uncertain of how much memory to
1952  *      allocate for this parameter, see the Discussion.
1953  *
1954  *    iTagValuePairArraySize:
1955  *      A value specifying the maximum number of tag and value size
1956  *      pairs to obtain for the text layout object. Typically, this is
1957  *      equivalent to the number of ATSUAttributeInfo structures for
1958  *      which you have allocated memory in the oAttributeInfoArray
1959  *      parameter. To determine this value, see the Discussion.
1960  *
1961  *    oTagValuePairCount:
1962  *      On return, the value specifies the actual number of
1963  *      ATSUAttributeInfo structures in the text layout object. This
1964  *      may be greater than the value you specified in the
1965  *      iTagValuePairArraySize parameter.
1966  *
1967  *  Result:
1968  *    On success, noErr is returned. See MacErrors.h for possible error
1969  *    codes.
1970  *
1971  *  Availability:
1972  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
1973  *    CarbonLib:        in CarbonLib 1.0 and later
1974  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
1975  }
ATSUGetAllLayoutControlsnull1976 function ATSUGetAllLayoutControls( iTextLayout: ATSUTextLayout; oAttributeInfoArray: {variable-size-array} ATSUAttributeInfoPtr; iTagValuePairArraySize: ItemCount; var oTagValuePairCount: ItemCount ): OSStatus; external name '_ATSUGetAllLayoutControls';
1977 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
1978 
1979 
1980 {
1981  *  ATSUClearLayoutControls()   *** DEPRECATED ***
1982  *
1983  *  Deprecated:
1984  *    Use CoreText API and CFAttributedStringSetAttributes instead.
1985  *
1986  *  Summary:
1987  *    Restores default values to the specified layout control
1988  *    attributes of a text layout object.
1989  *
1990  *  Discussion:
1991  *    This function removes those layout control attribute values
1992  *    identified by the tag constants in the iTag array and replaces
1993  *    them with the default values. If you specify that any currently
1994  *    unset attribute values be removed, the function does not return
1995  *    an error. For a list of layout control tags defined by ATSUI and
1996  *    their default values, see the definition of ATSUAttributeTag.
1997  *
1998  *  Parameters:
1999  *
2000  *    iTextLayout:
2001  *      The text layout in which you wish to clear layout controls.
2002  *
2003  *    iTagCount:
2004  *      The number of tags you wish to clear. This value should
2005  *      correspond to the nuumber of elements in the iTag array. Pass
2006  *      kATSUClearAll for this parameter if you wish to clear all
2007  *      layout controls.
2008  *
2009  *    iTag:
2010  *      An array of layout control tags to be cleared. For a list of
2011  *      layout control tags defined by ATSUI and their default values,
2012  *      see the definition of ATSUAttributeTag. You may pass NULL for
2013  *      this parameter if you are passing kATSUClearAll for the
2014  *      iTagCount parameter.
2015  *
2016  *  Result:
2017  *    On success, noErr is returned. See MacErrors.h for possible error
2018  *    codes.
2019  *
2020  *  Availability:
2021  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2022  *    CarbonLib:        in CarbonLib 1.0 and later
2023  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
2024  }
ATSUClearLayoutControlsnull2025 function ATSUClearLayoutControls( iTextLayout: ATSUTextLayout; iTagCount: ItemCount; {const} iTag: {variable-size-array} ATSUAttributeTagPtr { can be NULL } ): OSStatus; external name '_ATSUClearLayoutControls';
2026 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2027 
2028 
2029 { ---------------------------------------------------------------------------- }
2030 {  ATSUI line controls                                                         }
2031 { ---------------------------------------------------------------------------- }
2032 {
2033  *  ATSUCopyLineControls()   *** DEPRECATED ***
2034  *
2035  *  Deprecated:
2036  *    Use CoreText API and CFAttributedStringSetAttributes instead.
2037  *
2038  *  Summary:
2039  *    Copies line control attribute settings from a line in a source
2040  *    text layout object to a line in a destination text layout object.
2041  *
2042  *  Discussion:
2043  *    This function copies all line control attribute values to a line
2044  *    in a destination text layout object from a line in a source text
2045  *    layout object, including any default (unset) values in the source
2046  *    line. Unset line control attributes are assigned the default
2047  *    values. ATSUCopyLineControls does not copy the contents of memory
2048  *    referenced by pointers within custom line attributes or within
2049  *    reference constants. You are responsible for ensuring that this
2050  *    memory remains valid until the source text layout object is
2051  *    disposed.
2052  *
2053  *  Parameters:
2054  *
2055  *    iSourceTextLayout:
2056  *      The text layout object from which to copy line control
2057  *      attributes.
2058  *
2059  *    iSourceLineStart:
2060  *      The start of the line from which to copy line control
2061  *      attributes.
2062  *
2063  *    iDestTextLayout:
2064  *      The text layout object for which to set line control
2065  *      attributes. This can be the same text layout object passed in
2066  *      the iSourceTextLayout parameter if you want to copy line
2067  *      control attributes from one line to another within a text
2068  *      layout object.
2069  *
2070  *    iDestLineStart:
2071  *      The start of the line to which to copy line control attributes.
2072  *
2073  *  Result:
2074  *    On success, noErr is returned. See MacErrors.h for possible error
2075  *    codes.
2076  *
2077  *  Availability:
2078  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2079  *    CarbonLib:        in CarbonLib 1.0 and later
2080  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
2081  }
ATSUCopyLineControlsnull2082 function ATSUCopyLineControls( iSourceTextLayout: ATSUTextLayout; iSourceLineStart: UniCharArrayOffset; iDestTextLayout: ATSUTextLayout; iDestLineStart: UniCharArrayOffset ): OSStatus; external name '_ATSUCopyLineControls';
2083 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2084 
2085 
2086 {
2087  *  ATSUSetLineControls()   *** DEPRECATED ***
2088  *
2089  *  Deprecated:
2090  *    Use CoreText API and CFAttributedStringSetAttributes instead.
2091  *
2092  *  Summary:
2093  *    Sets one or more line control values for a specified line in a
2094  *    text layout.
2095  *
2096  *  Discussion:
2097  *    When you use ATSUI to image your text, you can control the text's
2098  *    display and formatting at a number of different levels: layout,
2099  *    line, and run. The level affected by this function is the line
2100  *    level. These attributes are similar to those that you can apply
2101  *    on a full-layout basis, but each affects only an individual text
2102  *    line. Note that setting line control attributes overrides the
2103  *    corresponding layout-level settings. Also, from a performance
2104  *    standpoint, it is preferable to work from the layout level and
2105  *    not specify such controls line by line unless necessary. Lines
2106  *    are determined by soft breaks that may be set in your layout. You
2107  *    can specify a line by giving a starting offset into the text
2108  *    buffer. Attributes at this level affect the width of the text
2109  *    area from margin to margin, the alignment of the text, its
2110  *    justification, rotation, and direction, as well as other layout
2111  *    options. Similar to style attributes, you use a "triple" to
2112  *    specify a line or layout control attribute. That is, (1) an
2113  *    attribute tag, (2) the size (in bytes) of the attribute value,
2114  *    and (3) the value of the attribute it sets. Attribute tags are
2115  *    constants supplied by ATSUI. Attribute values may be a scalar, a
2116  *    structure, or a pointer. And as with style attributes, you can
2117  *    also create a custom attribute for a line or layout attribute for
2118  *    which ATSUI does not provide a tag. For a list of line control
2119  *    tags defined by ATSUI and their default values, see the
2120  *    definition of ATSUAttributeTag.
2121  *
2122  *  Parameters:
2123  *
2124  *    iTextLayout:
2125  *      The layout in which you wish to set line controls.
2126  *
2127  *    iLineStart:
2128  *      The starting offset of the line for which you wish to set
2129  *      controls.
2130  *
2131  *    iAttributeCount:
2132  *      The number of attributes to set. This value should correspond
2133  *      to the number of elements in the iTag, iValueSize, and iValue
2134  *      arrays.
2135  *
2136  *    iTag:
2137  *      An array of attribute tags to set. For a list of line control
2138  *      tags defined by ATSUI and their default values, see the
2139  *      definition of ATSUAttributeTag.
2140  *
2141  *    iValueSize:
2142  *      An array of values indicating the sizes of the values pointed
2143  *      to by the elements in the iValue array.
2144  *
2145  *    iValue:
2146  *      An array of attribute value pointers. Each value in the array
2147  *      must correspond to a tag in the iTag array and be a legal value
2148  *      for that tag.
2149  *
2150  *  Result:
2151  *    On success, noErr is returned. See MacErrors.h for possible error
2152  *    codes.
2153  *
2154  *  Availability:
2155  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2156  *    CarbonLib:        in CarbonLib 1.0 and later
2157  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
2158  }
ATSUSetLineControlsnull2159 function ATSUSetLineControls( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iAttributeCount: ItemCount; {const} iTag: {variable-size-array} ATSUAttributeTagPtr; {const} iValueSize: {variable-size-array} ByteCountPtr; {const} iValue: {variable-size-array} ATSUAttributeValuePtrPtr ): OSStatus; external name '_ATSUSetLineControls';
2160 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2161 
2162 
2163 {
2164  *  ATSUGetLineControl()   *** DEPRECATED ***
2165  *
2166  *  Deprecated:
2167  *    Use CoreText API and CFAttributedStringSetAttributes instead.
2168  *
2169  *  Summary:
2170  *    Obtains a single line control attribute value for a line in a
2171  *    text layout object.
2172  *
2173  *  Discussion:
2174  *    Before calling ATSUGetLineControl, you should call the function
2175  *    ATSUGetAllLineControls to obtain an array of nondefault line
2176  *    control attribute tags and value sizes for the line. You can then
2177  *    pass the tag and value size for the attribute value to obtain to
2178  *    ATSUGetLineControl. Typically you use the function
2179  *    ATSUGetLineControl by calling it twice, as follows: (1) Pass a
2180  *    reference to the text layout object to examine in the iTextLayout
2181  *    parameter, NULL for the oValue parameter, 0 for the
2182  *    iExpectedValueSize parameter. ATSUGetLineControl returns the
2183  *    actual size of the attribute value in the oActualValueSize
2184  *    parameter. (2) Allocate enough space for an array of the returned
2185  *    size, then call the ATSUGetLineControl function again, passing a
2186  *    valid pointer in the oValue parameter. On return, the pointer
2187  *    refers to the actual attribute value contained for the line in
2188  *    the text layout object.
2189  *
2190  *  Parameters:
2191  *
2192  *    iTextLayout:
2193  *      The text layout for which to obtain a line control value.
2194  *
2195  *    iLineStart:
2196  *      The start of the line for which to obtain a line control value.
2197  *
2198  *    iTag:
2199  *      A tag specifying the line control value to be obtained. For a
2200  *      list of line control tags defined by ATSUI and their default
2201  *      values, see the definition of ATSUAttributeTag.
2202  *
2203  *    iExpectedValueSize:
2204  *      The expected size (in bytes) of the value to obtain.
2205  *
2206  *    oValue:
2207  *      On return, the actual attribute value. If you are uncertain of
2208  *      how much memory to allocate, see the Discussion.
2209  *
2210  *    oActualValueSize:
2211  *      On return, the value contains the actual size (in bytes) of the
2212  *      attribute value. You should examine this parameter if you are
2213  *      unsure of the size of the attribute value being obtained, as in
2214  *      the case of custom line control attributes.
2215  *
2216  *  Result:
2217  *    On success, noErr is returned. See MacErrors.h for possible error
2218  *    codes.
2219  *
2220  *  Availability:
2221  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2222  *    CarbonLib:        in CarbonLib 1.0 and later
2223  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
2224  }
ATSUGetLineControlnull2225 function ATSUGetLineControl( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iTag: ATSUAttributeTag; iExpectedValueSize: ByteCount; oValue: ATSUAttributeValuePtr { can be NULL }; oActualValueSize: ByteCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetLineControl';
2226 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2227 
2228 
2229 {
2230  *  ATSUGetAllLineControls()   *** DEPRECATED ***
2231  *
2232  *  Deprecated:
2233  *    Use CoreText API and CFAttributedStringGetAttributes instead.
2234  *
2235  *  Summary:
2236  *    Obtains an array of line control attribute tags and value sizes
2237  *    for a line in a text layout object.
2238  *
2239  *  Discussion:
2240  *    This function obtains all nondefault line control attribute tags
2241  *    and their values sizes for a line in a text layout object. You
2242  *    can pass a tag and value size pair obtained from
2243  *    ATSUGetAllLineControls to the function ATSUGetLineControl to
2244  *    determine the corresponding attribute value. Typically you use
2245  *    the function ATSUGetAllLineControls by calling it twice, as
2246  *    follows: (1) Pass a reference to the text layout object to
2247  *    examine in the iTextLayout parameter, the appropriate
2248  *    UniCharArrayOffset value in the iLineStart parameter, NULL for
2249  *    the oAttributeInfoArray parameter, a pointer to an ItemCount
2250  *    value in the oTagValuePairCount parameter, and 0 for the
2251  *    iTagValuePairArraySize parameter. ATSUGetAllLineControls returns
2252  *    the size of the tag and value size arrays in the
2253  *    oTagValuePairCount parameter. (2) Allocate enough space for an
2254  *    array of the returned size, then call the ATSUGetAllLineControls
2255  *    function again, passing a valid pointer in the
2256  *    oAttributeInfoArray parameter. On return, the pointer refers to
2257  *    an array of the line control attribute tag and value size pairs
2258  *    contained in the specified line. To obtain the nondefault layout
2259  *    control attribute tags and value sizes for a text layout object,
2260  *    call the function ATSUGetAllLayoutControls.
2261  *
2262  *  Parameters:
2263  *
2264  *    iTextLayout:
2265  *      The layout for which you wish to obtain line control
2266  *      information.
2267  *
2268  *    iLineStart:
2269  *      The beginning of the line for which you wish to obtain line
2270  *      control information.
2271  *
2272  *    oAttributeInfoArray:
2273  *      On return, this array contains pairs of tags and value sizes
2274  *      for the object's line control attributes that are not at
2275  *      default values. If you are uncertain of how much memory to
2276  *      allocate for this array, see the Discussion.
2277  *
2278  *    iTagValuePairArraySize:
2279  *      The size of of the array you allocated for the
2280  *      oAttributeInfoArray parameter.
2281  *
2282  *    oTagValuePairCount:
2283  *      On return, the value specifies the actual number of
2284  *      ATSUAttributeInfo structures in the line. This may be greater
2285  *      than the value you specified in the iTagValuePairArraySize
2286  *      parameter.
2287  *
2288  *  Result:
2289  *    On success, noErr is returned. See MacErrors.h for possible error
2290  *    codes.
2291  *
2292  *  Availability:
2293  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2294  *    CarbonLib:        in CarbonLib 1.0 and later
2295  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
2296  }
ATSUGetAllLineControlsnull2297 function ATSUGetAllLineControls( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; oAttributeInfoArray: {variable-size-array} ATSUAttributeInfoPtr { can be NULL }; iTagValuePairArraySize: ItemCount; oTagValuePairCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetAllLineControls';
2298 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2299 
2300 
2301 {
2302  *  ATSUClearLineControls()   *** DEPRECATED ***
2303  *
2304  *  Deprecated:
2305  *    Use CoreText API and CFAttributedStringSetAttributes instead.
2306  *
2307  *  Summary:
2308  *    Restores default values to the specified line control attributes
2309  *    of a text layout object.
2310  *
2311  *  Discussion:
2312  *    This function removes those line control attribute values
2313  *    identified by the tag constants in the iTag array and replaces
2314  *    them with the default values. If you specify that any currently
2315  *    unset attribute values be removed, the function does not return
2316  *    an error. For a list of line control tags defined by ATSUI and
2317  *    their default values, see the definition of ATSUAttributeTag.
2318  *
2319  *  Parameters:
2320  *
2321  *    iTextLayout:
2322  *      The text layout in which you wish to clear line controls.
2323  *
2324  *    iLineStart:
2325  *      The start of the line in which to clear line controls.
2326  *
2327  *    iTagCount:
2328  *      The number of tags you wish to clear. This value should
2329  *      correspond to the nuumber of elements in the iTag array. Pass
2330  *      kATSUClearAll to clear all line controls.
2331  *
2332  *    iTag:
2333  *      An array of line control tags to be cleared. For a list of line
2334  *      control tags defined by ATSUI and their default values, see the
2335  *      definition of ATSUAttributeTag. You may pass NULL for this
2336  *      parameter if you are passing kATSUClearAll for the iTagCount
2337  *      parameter.
2338  *
2339  *  Result:
2340  *    On success, noErr is returned. See MacErrors.h for possible error
2341  *    codes.
2342  *
2343  *  Availability:
2344  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2345  *    CarbonLib:        in CarbonLib 1.0 and later
2346  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
2347  }
ATSUClearLineControlsnull2348 function ATSUClearLineControls( iTextLayout: ATSUTextLayout; iLineStart: UniCharArrayOffset; iTagCount: ItemCount; {const} iTag: {variable-size-array} ATSUAttributeTagPtr { can be NULL } ): OSStatus; external name '_ATSUClearLineControls';
2349 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2350 
2351 
2352 { ---------------------------------------------------------------------------- }
2353 {  ATSUI style run processing                                                  }
2354 { ---------------------------------------------------------------------------- }
2355 {$endc} {not TARGET_CPU_64}
2356 
2357 {
2358  *  ATSUSetRunStyle()   *** DEPRECATED ***
2359  *
2360  *  Deprecated:
2361  *    Use CoreText API and CFAttributedStringSetAttributes instead.
2362  *
2363  *  Summary:
2364  *    Defines a style run by associating style information with a run
2365  *    of text.
2366  *
2367  *  Discussion:
2368  *    A text run consists of one or more characters that are contiguous
2369  *    in memory. If you associate these characters with a distinct
2370  *    style, you define a style run. You can use the ATSUSetRunStyle
2371  *    function to define a style run, by associating a style object
2372  *    with a run of text in a text layout object. Each text run must be
2373  *    assigned a style object, which may or may not differ from other
2374  *    style objects assigned to other text runs in a given text layout
2375  *    object. After calling ATSUSetRunStyle, you can call the function
2376  *    ATSUDrawText to display the styled text. When you call
2377  *    ATSUDrawText, if you have not previously assigned styles to all
2378  *    the characters you request to be drawn, ATSUI automatically does
2379  *    so. Specifically, ATSUI extends the first style it locates
2380  *    immediately prior (in storage order) to the unstyled characters
2381  *    to include those unassigned characters. If the unstyled
2382  *    characters are at the beginning of the text stream, ATSUI finds
2383  *    the first style run in the stream and extends it backward to the
2384  *    first character. You should call ATSUSetRunStyle whenever you
2385  *    create a new text layout object without any associated styles, as
2386  *    by using the function ATSUCreateTextLayout. You should also call
2387  *    ATSUSetRunStyle to assign a style to a text run in response to a
2388  *    user action, such as when the user selects a run of text and
2389  *    changes the font. You do not need to call ATSUSetRunStyle when
2390  *    you change style attributes or text layout attributes. In such
2391  *    cases, ATSUI automatically updates the layout of the text as
2392  *    appropriate.
2393  *
2394  *  Parameters:
2395  *
2396  *    iTextLayout:
2397  *      The layout in which you wish to set the style run.
2398  *
2399  *    iStyle:
2400  *      The style to be assigned to the run of characters.
2401  *
2402  *    iRunStart:
2403  *      The start of the run of characters. To specify the beginning of
2404  *      the text buffer, pass kATSUFromTextBeginning for this parameter.
2405  *
2406  *    iRunLength:
2407  *      The end of the run of characters. To specify a run that
2408  *      continues to the end of the text buffer, pass kATSUToTextEnd
2409  *      for this parameter.
2410  *
2411  *  Result:
2412  *    On success, noErr is returned. See MacErrors.h for possible error
2413  *    codes.
2414  *
2415  *  Availability:
2416  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
2417  *    CarbonLib:        in CarbonLib 1.0 and later
2418  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
2419  }
ATSUSetRunStylenull2420 function ATSUSetRunStyle( iTextLayout: ATSUTextLayout; iStyle: ATSUStyle; iRunStart: UniCharArrayOffset; iRunLength: UniCharCount ): OSStatus; external name '_ATSUSetRunStyle';
2421 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2422 
2423 
2424 {$ifc not TARGET_CPU_64}
2425 {
2426  *  ATSUGetRunStyle()   *** DEPRECATED ***
2427  *
2428  *  Deprecated:
2429  *    Use CTLineGetGlyphRuns instead.
2430  *
2431  *  Summary:
2432  *    Obtains style run information for a character offset in a run of
2433  *    text.
2434  *
2435  *  Discussion:
2436  *    You can use the ATSUGetRunStyle function to obtain the style
2437  *    object assigned to a given text offset. ATSUGetRunStyle also
2438  *    produces the encompassing text range that shares the style object
2439  *    with the offset. Note that the style object contains those
2440  *    previously set style attributes, font features, and font
2441  *    variations that are continuous for the range of text that
2442  *    includes the specified text offset. If you want to obtain all
2443  *    shared style information for a style run, including any unset
2444  *    attributes, call the function ATSUGetContinuousAttributes
2445  *    instead. If only one style run is set in the text layout object,
2446  *    and it does not cover the entire text layout object,
2447  *    ATSUGetRunStyle uses the style run information for the iOffset
2448  *    parameter to set the style run information for the remaining text.
2449  *
2450  *  Parameters:
2451  *
2452  *    iTextLayout:
2453  *      The layout for which to obtain style run information.
2454  *
2455  *    iOffset:
2456  *      The beginning character for which you want to obtain style run
2457  *      information.
2458  *
2459  *    oStyle:
2460  *      On return, the style object assigned to the range of text
2461  *      containing the character at iOffset. Note that if you pass an
2462  *      offset in the iOffset parameter that is at a style run
2463  *      boundary, ATSUGetRunStyle produces style run information for
2464  *      the following, not preceding, style run.
2465  *
2466  *    oRunStart:
2467  *      On return, the offset from the beginning of the text buffer to
2468  *      the first character of the style run containing the character
2469  *      at iOffset. Note that the entire style run does not necessarily
2470  *      share the same unset attribute values as the character at
2471  *      iOffset.
2472  *
2473  *    oRunLength:
2474  *      On return, the length of the style run containing the character
2475  *      at iOffset.
2476  *
2477  *  Result:
2478  *    On success, noErr is returned. See MacErrors.h for possible error
2479  *    codes.
2480  *
2481  *  Availability:
2482  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2483  *    CarbonLib:        in CarbonLib 1.0 and later
2484  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
2485  }
ATSUGetRunStylenull2486 function ATSUGetRunStyle( iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; var oStyle: ATSUStyle; var oRunStart: UniCharArrayOffset; var oRunLength: UniCharCount ): OSStatus; external name '_ATSUGetRunStyle';
2487 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2488 
2489 
2490 {
2491  *  ATSUGetContinuousAttributes()   *** DEPRECATED ***
2492  *
2493  *  Deprecated:
2494  *    Use CTParagraphStyleCreate instead.
2495  *
2496  *  Summary:
2497  *    Obtains the style attribute values that are continuous over a
2498  *    given text range.
2499  *
2500  *  Discussion:
2501  *    This function examines the specified text range to obtain the
2502  *    style attribute values (including those at default values) that
2503  *    remain consistent for the entire text range. You should call
2504  *    ATSUGetContinuousAttributes to determine the style information
2505  *    that remains constant over text that has been selected by the
2506  *    user.
2507  *
2508  *  Parameters:
2509  *
2510  *    iTextLayout:
2511  *      The layout for which you wish to obtain style run information.
2512  *
2513  *    iOffset:
2514  *      The starting character for which to examine style run
2515  *      attributes. To specify the beginning of the text buffer, pass
2516  *      kATSUFromTextBeginning for this parameter.
2517  *
2518  *    iLength:
2519  *      The length of the range of characters to examine. To specify a
2520  *      range that continues to the end of the text buffer, pass
2521  *      kATSUToTextEnd for this parameter.
2522  *
2523  *    oStyle:
2524  *      On return, a style object containing those attributes which are
2525  *      the same for the entire text range specified by the iOffset and
2526  *      iLength parameters.
2527  *
2528  *  Result:
2529  *    On success, noErr is returned. See MacErrors.h for possible error
2530  *    codes.
2531  *
2532  *  Availability:
2533  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2534  *    CarbonLib:        in CarbonLib 1.0 and later
2535  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
2536  }
ATSUGetContinuousAttributesnull2537 function ATSUGetContinuousAttributes( iTextLayout: ATSUTextLayout; iOffset: UniCharArrayOffset; iLength: UniCharCount; oStyle: ATSUStyle ): OSStatus; external name '_ATSUGetContinuousAttributes';
2538 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2539 
2540 
2541 { ---------------------------------------------------------------------------- }
2542 {  ATSUI tab support                                                           }
2543 { ---------------------------------------------------------------------------- }
2544 {
2545  *  ATSUSetTabArray()   *** DEPRECATED ***
2546  *
2547  *  Deprecated:
2548  *    Use CTParagraphStyleCreate instead.
2549  *
2550  *  Summary:
2551  *    Sets a tab ruler for a text layout object.
2552  *
2553  *  Discussion:
2554  *    When a tab ruler is set for a text layout object, ATSUI
2555  *    automatically aligns text such that any tabs characters in the
2556  *    text are laid out to follow the tab ruler's specifications. If
2557  *    you want to use tabs in your text and you also want to use the
2558  *    function ATSUBatchBreakLines, then you must set tabs by calling
2559  *    the function ATSUSetTabArray. See the definition of ATSUTab for
2560  *    more information about setting up a tab ruler.
2561  *
2562  *  Parameters:
2563  *
2564  *    iTextLayout:
2565  *      The layout in which to set the tab array.
2566  *
2567  *    iTabs:
2568  *      An array of tabstops. See the definition of ATSUTab for more
2569  *      inforamation about specifying tabs.
2570  *
2571  *    iTabCount:
2572  *      The number of tab stops in the iTabs array.
2573  *
2574  *  Result:
2575  *    On success, noErr is returned. See MacErrors.h for possible error
2576  *    codes.
2577  *
2578  *  Availability:
2579  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2580  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2581  *    Non-Carbon CFM:   not available
2582  }
ATSUSetTabArraynull2583 function ATSUSetTabArray( iTextLayout: ATSUTextLayout; {const} iTabs: {variable-size-array} ATSUTabPtr; iTabCount: ItemCount ): OSStatus; external name '_ATSUSetTabArray';
2584 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2585 
2586 
2587 {
2588  *  ATSUGetTabArray()   *** DEPRECATED ***
2589  *
2590  *  Deprecated:
2591  *    Use CTParagraphStyleCreate instead.
2592  *
2593  *  Summary:
2594  *    Retrieves the tab ruler associated with a text layout object.
2595  *
2596  *  Discussion:
2597  *    This function can be used to retrieve all the tabs that were
2598  *    previously set for a text layout object, using the function
2599  *    ATSUSetTabArray . All the returned tabs will be in order of
2600  *    position along the line.Typically you use the ATSUGetTabArray
2601  *    function by calling it twice, as follows: (1) Pass NULL for the
2602  *    oTabs parameter, 0 for the iMaxTabCount parameter, and valid
2603  *    values for the other parameters. The ATSUGetTabArray function
2604  *    returns the actual number of tabs in the oTabCount parameter. (2)
2605  *    Allocate enough space for a buffer of the returned size, then
2606  *    call the function again, passing a valid pointer to the buffer in
2607  *    the oTabs parameter. On return, the buffer contains the tab
2608  *    values in order of position along the line from left to right.
2609  *
2610  *  Parameters:
2611  *
2612  *    iTextLayout:
2613  *      The text layout for which to retrieve the tab ruler.
2614  *
2615  *    iMaxTabCount:
2616  *      The size of the array you have allocated for the oTabs
2617  *      parameter. If you are unsure what to pass for this parameter,
2618  *      see the Discussion.
2619  *
2620  *    oTabs:
2621  *      On return, an array of ATSUTab structures specifying the
2622  *      currently set tab ruler for this layout.
2623  *
2624  *    oTabCount:
2625  *      On return, the number of tabs currently set in this layout.
2626  *      Note that this may be greater than the value you have passed
2627  *      for iMaxTabCount.
2628  *
2629  *  Result:
2630  *    On success, noErr is returned. See MacErrors.h for possible error
2631  *    codes.
2632  *
2633  *  Availability:
2634  *    Mac OS X:         in version 10.2 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2635  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2636  *    Non-Carbon CFM:   not available
2637  }
ATSUGetTabArraynull2638 function ATSUGetTabArray( iTextLayout: ATSUTextLayout; iMaxTabCount: ItemCount; oTabs: {variable-size-array} ATSUTabPtr { can be NULL }; oTabCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetTabArray';
2639 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2640 
2641 
2642 { ---------------------------------------------------------------------------- }
2643 { ATSUI font fallback object functions                                         }
2644 { ---------------------------------------------------------------------------- }
2645 {
2646  *  ATSUCreateFontFallbacks()   *** DEPRECATED ***
2647  *
2648  *  Deprecated:
2649  *    Use CTFontDescriptorCreateCopyWithAttributes instead.
2650  *
2651  *  Summary:
2652  *    Creates an opaque object that can be set to contain a font list
2653  *    and a font-search method.
2654  *
2655  *  Discussion:
2656  *    After using this fucntion to create an ATSUFontFallbacks object,
2657  *    you can then use ATSUSetObjFontFallbacks to set the fallback
2658  *    method for this object, and then use the
2659  *    kATSULineFontFallbacksTag to apply the object to a layout. You
2660  *    may then either call ATSUMatchFontsToText to manually perform
2661  *    font substitution, or call ATSUSetTransientFontMatching to
2662  *    perform automatic font subtitution.
2663  *
2664  *  Parameters:
2665  *
2666  *    oFontFallback:
2667  *      On return, a reference to a newly created ATSUFontFallbacks
2668  *      object. You are responsible for freeing this object with
2669  *      ATSUDisposeFontFallbacks.
2670  *
2671  *  Result:
2672  *    On success, noErr is returned. See MacErrors.h for possible error
2673  *    codes.
2674  *
2675  *  Availability:
2676  *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2677  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
2678  *    Non-Carbon CFM:   not available
2679  }
ATSUCreateFontFallbacksnull2680 function ATSUCreateFontFallbacks( var oFontFallback: ATSUFontFallbacks ): OSStatus; external name '_ATSUCreateFontFallbacks';
2681 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2682 
2683 
2684 {
2685  *  ATSUDisposeFontFallbacks()   *** DEPRECATED ***
2686  *
2687  *  Deprecated:
2688  *    Use CTFontDescriptorCreateCopyWithAttributes instead.
2689  *
2690  *  Summary:
2691  *    Disposes of an ATSUDisposeFontFallbacks object.
2692  *
2693  *  Discussion:
2694  *    This function will only dispose of the ATSUDisposeFontFallbacks
2695  *    itself. If you have allocated an array of ATSUFontIDs for use
2696  *    with this ATSUFontFallbacks object, you are responsible for
2697  *    freeing it separately.
2698  *
2699  *  Parameters:
2700  *
2701  *    iFontFallbacks:
2702  *      The ATSUFontFallbacks object to be disposed of.
2703  *
2704  *  Result:
2705  *    On success, noErr is returned. See MacErrors.h for possible error
2706  *    codes.
2707  *
2708  *  Availability:
2709  *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2710  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
2711  *    Non-Carbon CFM:   not available
2712  }
ATSUDisposeFontFallbacksnull2713 function ATSUDisposeFontFallbacks( iFontFallbacks: ATSUFontFallbacks ): OSStatus; external name '_ATSUDisposeFontFallbacks';
2714 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2715 
2716 
2717 {
2718  *  ATSUSetObjFontFallbacks()   *** DEPRECATED ***
2719  *
2720  *  Deprecated:
2721  *    Use CTFontDescriptorCreateCopyWithAttributes instead.
2722  *
2723  *  Summary:
2724  *    Assigns a font-search method and a font list to a font fallback
2725  *    object.
2726  *
2727  *  Discussion:
2728  *    This function allows you to define the settings for a font
2729  *    fallback object. These settings determine the method ATSUI uses
2730  *    to perform font fallbacks, as well as the font search list, if
2731  *    one is needed. Not all fallback methods require a search list.
2732  *    See the definition of ATSUFontFallbackMethod for more infomation
2733  *    about the different font fallback methods. Once you have called
2734  *    this function, you typically will want to associate the font
2735  *    fallback object with a text layout using ATSUSetLayoutControls
2736  *    and the kATSULineFontFallbacksTag attribute.
2737  *
2738  *  Parameters:
2739  *
2740  *    iFontFallbacks:
2741  *      The fallback object for which you wish to set or change
2742  *      settings.
2743  *
2744  *    iFontFallbacksCount:
2745  *      The number of fonts contained in the iFonts array. Some font
2746  *      fallbacks methods do not require such a list. In such cases,
2747  *      you may pass zero for this paramter.
2748  *
2749  *    iFonts:
2750  *      A list of fonts for ATSUI to search through when performing
2751  *      fallbacks. Some font fallbacks methods do not require such a
2752  *      list. In such cases, you may pass NULL for this parameter.
2753  *
2754  *    iFontFallbackMethod:
2755  *      The font fallback method for ATSUI to use. See the definition
2756  *      of ATSUFontFallbackMethod for a list of possible constants to
2757  *      pass in for this paramater. Note that some fallback modes
2758  *      require a list of fonts for ATSUI to search. In such cases, use
2759  *      the iFonts and iFontFallbacksCount parameters to specify this
2760  *      list.
2761  *
2762  *  Result:
2763  *    On success, noErr is returned. See MacErrors.h for possible error
2764  *    codes.
2765  *
2766  *  Availability:
2767  *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2768  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
2769  *    Non-Carbon CFM:   not available
2770  }
ATSUSetObjFontFallbacksnull2771 function ATSUSetObjFontFallbacks( iFontFallbacks: ATSUFontFallbacks; iFontFallbacksCount: ItemCount; {const} iFonts: {variable-size-array} ATSUFontIDPtr { can be NULL }; iFontFallbackMethod: ATSUFontFallbackMethod ): OSStatus; external name '_ATSUSetObjFontFallbacks';
2772 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2773 
2774 
2775 {
2776  *  ATSUGetObjFontFallbacks()   *** DEPRECATED ***
2777  *
2778  *  Deprecated:
2779  *    Use CTFontDescriptorCreateCopyWithAttributes instead.
2780  *
2781  *  Summary:
2782  *    Returns information about the current settings in an
2783  *    ATSUFontFallbacks object.
2784  *
2785  *  Discussion:
2786  *    Information returned includes the font-search method, and the
2787  *    font search list, if one is set. Note that some font fallback
2788  *    modes do not have a client-specified search list. You must
2789  *    allocate space for this list.
2790  *
2791  *  Parameters:
2792  *
2793  *    iFontFallbacks:
2794  *      The font fallback object you want to know the current settings
2795  *      of.
2796  *
2797  *    iMaxFontFallbacksCount:
2798  *      For this parameter, pass in the size of the array you are
2799  *      passing in for the oFonts parameter.
2800  *
2801  *    oFonts:
2802  *      On input, a buffer you have allocated for storing the font
2803  *      search list. On return, ATSUGetObjFontFallbacks will populate
2804  *      the list up to iMaxFontFallbacksCount items.
2805  *
2806  *    oFontFallbackMethod:
2807  *      On return, the font fallback method currently set for this
2808  *      object. See the definition of ATSUFontFallbackMethod for more
2809  *      information regarding the different font fallback modes.
2810  *
2811  *    oActualFallbacksCount:
2812  *      On return, the size of the font search list. You can use this
2813  *      parameter to determine how much space to allocate for the
2814  *      oFonts parameter.
2815  *
2816  *  Result:
2817  *    On success, noErr is returned. See MacErrors.h for possible error
2818  *    codes.
2819  *
2820  *  Availability:
2821  *    Mac OS X:         in version 10.1 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
2822  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
2823  *    Non-Carbon CFM:   not available
2824  }
ATSUGetObjFontFallbacksnull2825 function ATSUGetObjFontFallbacks( iFontFallbacks: ATSUFontFallbacks; iMaxFontFallbacksCount: ItemCount; oFonts: {variable-size-array} ATSUFontIDPtr { can be NULL }; var oFontFallbackMethod: ATSUFontFallbackMethod; oActualFallbacksCount: ItemCountPtr { can be NULL } ): OSStatus; external name '_ATSUGetObjFontFallbacks';
2826 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2827 
2828 
2829 { ---------------------------------------------------------------------------- }
2830 {  ATSUI font matching                                                         }
2831 { ---------------------------------------------------------------------------- }
2832 {$endc} {not TARGET_CPU_64}
2833 
2834 {
2835  *  ATSUMatchFontsToText()   *** DEPRECATED ***
2836  *
2837  *  Deprecated:
2838  *    Use CTFontCreateForString instead.
2839  *
2840  *  Summary:
2841  *    Examines a text range for characters that cannot be drawn with
2842  *    the current font and suggests a substitute font, if necessary.
2843  *
2844  *  Discussion:
2845  *    When you call the ATSUMatchFontsToText function, ATSUI scans the
2846  *    given range of text for characters that cannot be drawn with the
2847  *    currently assigned font. When ATSUI finds such a character, it
2848  *    identifies a substitute font for drawing the character. ATSUI
2849  *    then continues scanning the text range for subsequent characters
2850  *    that cannot be drawn, stopping when it finds a character that can
2851  *    be drawn with the currently assigned font, or finds a character
2852  *    that cannot be drawn with either the currently assigned font or
2853  *    the substitute font, or reaches the end of the text range you
2854  *    have specified. ATSUI's default behavior for finding a substitute
2855  *    font is to recommend the first valid font that it finds when
2856  *    scanning the fonts in the user's system. ATSUI first searches in
2857  *    the standard application fonts for various languages. If that
2858  *    fails, ATSUI searches through the remaining fonts on the system
2859  *    in the order in which the Font Manager returns the fonts. After
2860  *    ATSUI has searched all the fonts in the system, any unmatched
2861  *    text is drawn using the last-resort font. That is, missing glyphs
2862  *    are represented by and empty box to indicate to the user that a
2863  *    valid font for that character is not installed on their system.
2864  *    You can alter ATSUI's default search behavior by calling the
2865  *    function ATSUCreateFontFallbacks and defining your own font
2866  *    fallback settings for the text layout object. Because ATSUI does
2867  *    not necessarily completely scan the text range you specify with
2868  *    each call to ATSUMatchFontsToText, if ATSUI does find any
2869  *    characters that cannot be rendered with their current font, you
2870  *    should call ATSUMatchFontsToText again and update the input range
2871  *    to check that all the subsequent characters in the range can be
2872  *    drawn. For that reason, you should call ATSUMatchFontsToText from
2873  *    within a loop to assure that the entire range of text is checked.
2874  *    Note that calling ATSUMatchFontsToText does not cause the
2875  *    suggested font substitution to be performed. If you want ATSUI to
2876  *    perform font substitution automatically, you can call the
2877  *    function ATSUSetTransientFontMatching.
2878  *
2879  *  Parameters:
2880  *
2881  *    iTextLayout:
2882  *      The text layout object to examine.
2883  *
2884  *    iTextStart:
2885  *      The first character of the range to examine. To start at the
2886  *      beginning of the text buffer, pass the constant
2887  *      kATSUFromTextBeginning.
2888  *
2889  *    iTextLength:
2890  *      The length of the text range to examine. If you want the range
2891  *      of text to extend to the end of the text buffer, you can pass
2892  *      the constant kATSUToTextEnd.
2893  *
2894  *    oFontID:
2895  *      On return, the value provides a font ID for the suggested
2896  *      substitute font or kATSUInvalidFontID, if no substitute font is
2897  *      available.
2898  *
2899  *    oChangedOffset:
2900  *      On return, this value specifies the offset from the beginning
2901  *      of the text buffer to the first character that cannot be drawn
2902  *      with the current font.
2903  *
2904  *    oChangedLength:
2905  *      On return, this value specifies the length of the text range
2906  *      that cannot be drawn with the current font.
2907  *
2908  *  Result:
2909  *    The result code noErr indicates that all the characters in the
2910  *    given range can be rendered with their current font(s) and no
2911  *    font substitution is needed. If you receive either of the result
2912  *    codes kATSUFontsMatched or kATSUFontsNotMatched, you should
2913  *    update the input range and call ATSUMatchFontsToText again to
2914  *    ensure that all the characters in the range can be drawn. See
2915  *    MacErrors.h for other possible error codes.
2916  *
2917  *  Availability:
2918  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
2919  *    CarbonLib:        in CarbonLib 1.0 and later
2920  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
2921  }
ATSUMatchFontsToTextnull2922 function ATSUMatchFontsToText( iTextLayout: ATSUTextLayout; iTextStart: UniCharArrayOffset; iTextLength: UniCharCount; var oFontID: ATSUFontID; var oChangedOffset: UniCharArrayOffset; var oChangedLength: UniCharCount ): OSStatus; external name '_ATSUMatchFontsToText';
2923 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2924 
2925 
2926 {
2927  *  ATSUSetTransientFontMatching()   *** DEPRECATED ***
2928  *
2929  *  Deprecated:
2930  *    Use CoreText API instead.
2931  *
2932  *  Summary:
2933  *    Sets the current transient font matching state for a given layout.
2934  *
2935  *  Discussion:
2936  *    Transient font matching allows ATSUI to automatically substitute
2937  *    glyphs from other fonts if the specified styles do not contain
2938  *    glyphs for all the characters in the text. You can change the
2939  *    behavior of this font substitution by calling the function
2940  *    ATSUCreateFontFallbacks and defining your own font fallback
2941  *    settings for the text layout object.
2942  *
2943  *  Parameters:
2944  *
2945  *    iTextLayout:
2946  *      A layout for which to set the current transient font matching
2947  *      state.
2948  *
2949  *    iTransientFontMatching:
2950  *      A boolean value indicating if the current transient font
2951  *      matching state to set.
2952  *
2953  *  Result:
2954  *    On success, noErr is returned. See MacErrors.h for possible error
2955  *    codes.
2956  *
2957  *  Availability:
2958  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework but deprecated in 10.6
2959  *    CarbonLib:        in CarbonLib 1.0 and later
2960  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
2961  }
ATSUSetTransientFontMatchingnull2962 function ATSUSetTransientFontMatching( iTextLayout: ATSUTextLayout; iTransientFontMatching: Boolean ): OSStatus; external name '_ATSUSetTransientFontMatching';
2963 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
2964 
2965 
2966 {$ifc not TARGET_CPU_64}
2967 {
2968  *  ATSUGetTransientFontMatching()   *** DEPRECATED ***
2969  *
2970  *  Deprecated:
2971  *    Use CoreText API instead.
2972  *
2973  *  Summary:
2974  *    Obtains the current transient font matching state for a given
2975  *    layout.
2976  *
2977  *  Discussion:
2978  *    Transient font matching allows ATSUI to automatically substitute
2979  *    glyphs from other fonts if the specified styles do not contain
2980  *    glyphs for all the characters in the text. You can change the
2981  *    behavior of this font substitution by calling the function
2982  *    ATSUCreateFontFallbacks and defining your own font fallback
2983  *    settings for the text layout object.
2984  *
2985  *  Parameters:
2986  *
2987  *    iTextLayout:
2988  *      A layout for which to obtain the current transient font
2989  *      matching state.
2990  *
2991  *    oTransientFontMatching:
2992  *      On return, a boolean value indicating the current transient
2993  *      font matching state.
2994  *
2995  *  Result:
2996  *    On success, noErr is returned. See MacErrors.h for possible error
2997  *    codes.
2998  *
2999  *  Availability:
3000  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.6
3001  *    CarbonLib:        in CarbonLib 1.0 and later
3002  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
3003  }
ATSUGetTransientFontMatchingnull3004 function ATSUGetTransientFontMatching( iTextLayout: ATSUTextLayout; var oTransientFontMatching: Boolean ): OSStatus; external name '_ATSUGetTransientFontMatching';
3005 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
3006 
3007 
3008 { Functions listed beyond this point are either deprecated or not recommended }
3009 
3010 { ---------------------------------------------------------------------------- }
3011 { ATSUI global font fallback functions                                        }
3012 { ---------------------------------------------------------------------------- }
3013 {
3014  *  ATSUSetFontFallbacks()   *** DEPRECATED ***
3015  *
3016  *  Deprecated:
3017  *    Use CoreText API instead.
3018  *
3019  *  Summary:
3020  *    Sets font fallback behavior on a global basis.
3021  *
3022  *  Discussion:
3023  *    Control of font fallback behavior on a global basis is no longer
3024  *    recommended. Object based font fallbacks are preferred. See the
3025  *    functions ATSUCreateFontFallbacks, ATSUDisposeFontFallbacks,
3026  *    ATSUSetObjFontFallbacks, and ATSUGetObjFontFallbacks, as well as
3027  *    the kATSULineFontFallbacksTag attribute for more information
3028  *    about object based font fallbacks.
3029  *
3030  *  Result:
3031  *    On success, noErr is returned. See MacErrors.h for possible error
3032  *    codes.
3033  *
3034  *  Availability:
3035  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.3
3036  *    CarbonLib:        in CarbonLib 1.0 and later
3037  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
3038  }
ATSUSetFontFallbacksnull3039 function ATSUSetFontFallbacks( iFontFallbacksCount: ItemCount; {const} iFontIDs: {variable-size-array} ATSUFontIDPtr; iFontFallbackMethod: ATSUFontFallbackMethod ): OSStatus; external name '_ATSUSetFontFallbacks';
3040 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
3041 
3042 
3043 {
3044  *  ATSUGetFontFallbacks()   *** DEPRECATED ***
3045  *
3046  *  Deprecated:
3047  *    Use CoreText API instead.
3048  *
3049  *  Summary:
3050  *    Gets the current global font fallback behavior.
3051  *
3052  *  Discussion:
3053  *    Control of font fallback behavior on a global basis is no longer
3054  *    recommended. Object based font fallbacks are preferred. See the
3055  *    functions ATSUCreateFontFallbacks, ATSUDisposeFontFallbacks,
3056  *    ATSUSetObjFontFallbacks, and ATSUGetObjFontFallbacks, as well as
3057  *    the kATSULineFontFallbacksTag attribute for more information
3058  *    about object based font fallbacks.
3059  *
3060  *  Result:
3061  *    On success, noErr is returned. See MacErrors.h for possible error
3062  *    codes.
3063  *
3064  *  Availability:
3065  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.3
3066  *    CarbonLib:        in CarbonLib 1.0 and later
3067  *    Non-Carbon CFM:   in ATSUnicodeLib 8.6 and later
3068  }
ATSUGetFontFallbacksnull3069 function ATSUGetFontFallbacks( iMaxFontFallbacksCount: ItemCount; oFontIDs: {variable-size-array} ATSUFontIDPtr; var oFontFallbackMethod: ATSUFontFallbackMethod; var oActualFallbacksCount: ItemCount ): OSStatus; external name '_ATSUGetFontFallbacks';
3070 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
3071 
3072 
3073 { ---------------------------------------------------------------------------- }
3074 {  Handle-based functions                                                      }
3075 { ---------------------------------------------------------------------------- }
3076 {
3077  *  ATSUCreateTextLayoutWithTextHandle()   *** DEPRECATED ***
3078  *
3079  *  Deprecated:
3080  *    Use CTTypesetterCreateWithAttributedString,
3081  *    CTTypesetterCreateWithAttributedStringAndOptions,
3082  *    CTLineCreateWithAttributedString, CTLineCreateTruncatedLine, or
3083  *    CTLineCreateJustifiedLine instead.
3084  *
3085  *  Discussion:
3086  *    This function is no longer recommended. Please use
3087  *    ATSUCreateTextLayoutWithTextPtr instead.
3088  *
3089  *  Availability:
3090  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.0
3091  *    CarbonLib:        in CarbonLib 1.0 and later
3092  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
3093  }
ATSUCreateTextLayoutWithTextHandlenull3094 function ATSUCreateTextLayoutWithTextHandle( iText: UniCharArrayHandle; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount; iNumberOfRuns: ItemCount; {const} iRunLengths: {variable-size-array} UniCharCountPtr; iStyles: {variable-size-array} ATSUStylePtr; var oTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUCreateTextLayoutWithTextHandle';
3095 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
3096 
3097 
3098 {
3099  *  ATSUSetTextHandleLocation()   *** DEPRECATED ***
3100  *
3101  *  Deprecated:
3102  *    Use CoreText API and CFAttributedStringSetAttributes instead.
3103  *
3104  *  Discussion:
3105  *    This function is no longer recommended. Please use
3106  *    ATSUSetTextPointerLocation instead.
3107  *
3108  *  Availability:
3109  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.0
3110  *    CarbonLib:        in CarbonLib 1.0 and later
3111  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
3112  }
ATSUSetTextHandleLocationnull3113 function ATSUSetTextHandleLocation( iTextLayout: ATSUTextLayout; iText: UniCharArrayHandle; iTextOffset: UniCharArrayOffset; iTextLength: UniCharCount; iTextTotalLength: UniCharCount ): OSStatus; external name '_ATSUSetTextHandleLocation';
3114 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
3115 
3116 
3117 { ---------------------------------------------------------------------------- }
3118 {  ATSUI idle processing (deprecated)                                          }
3119 { ---------------------------------------------------------------------------- }
3120 {
3121  *  ATSUIdle()   *** DEPRECATED ***
3122  *
3123  *  Deprecated:
3124  *    No longer needed on MacOS X.
3125  *
3126  *  Summary:
3127  *    Performs background processing.
3128  *
3129  *  Discussion:
3130  *    Current versions of ATSUI do not implement background processing
3131  *    for text layout objects. In Mac OS X, the function ATSUIdle does
3132  *    nothing.
3133  *
3134  *  Availability:
3135  *    Mac OS X:         in version 10.0 and later in ApplicationServices.framework [32-bit only] but deprecated in 10.0
3136  *    CarbonLib:        in CarbonLib 1.0 and later
3137  *    Non-Carbon CFM:   in ATSUnicodeLib 8.5 and later
3138  }
ATSUIdlenull3139 function ATSUIdle( iTextLayout: ATSUTextLayout ): OSStatus; external name '_ATSUIdle';
3140 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED *)
3141 
3142 
3143 {$endc} {not TARGET_CPU_64}
3144 
3145 {$endc} {TARGET_OS_MAC}
3146 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
3147 
3148 end.
3149 {$endc} {not MACOSALLINCLUDE}
3150