1 {
2      File:       HIToolbox/MacTextEditor.h
3 
4      Contains:   Interfaces for Multilingual Text Engine (MLTE)
5 
6      Version:    HIToolbox-624~3
7 
8      Copyright:  � 1996-2008 by Apple Computer, 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 Updated:  Peter N Lewis, <peter@stairways.com.au>, August 2005 }
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 MacTextEditor;
34 interface
35 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
36 {$setc GAP_INTERFACES_VERSION := $0308}
37 
38 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
39     {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
40 {$endc}
41 
42 {$ifc defined CPUPOWERPC and defined CPUI386}
43 	{$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
44 {$endc}
45 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
46 	{$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
47 {$endc}
48 
49 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
50 	{$setc __ppc__ := 1}
51 {$elsec}
52 	{$setc __ppc__ := 0}
53 {$endc}
54 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
55 	{$setc __ppc64__ := 1}
56 {$elsec}
57 	{$setc __ppc64__ := 0}
58 {$endc}
59 {$ifc not defined __i386__ and defined CPUI386}
60 	{$setc __i386__ := 1}
61 {$elsec}
62 	{$setc __i386__ := 0}
63 {$endc}
64 {$ifc not defined __x86_64__ and defined CPUX86_64}
65 	{$setc __x86_64__ := 1}
66 {$elsec}
67 	{$setc __x86_64__ := 0}
68 {$endc}
69 {$ifc not defined __arm__ and defined CPUARM}
70 	{$setc __arm__ := 1}
71 {$elsec}
72 	{$setc __arm__ := 0}
73 {$endc}
74 {$ifc not defined __arm64__ and defined CPUAARCH64}
75   {$setc __arm64__ := 1}
76 {$elsec}
77   {$setc __arm64__ := 0}
78 {$endc}
79 
80 {$ifc defined cpu64}
81   {$setc __LP64__ := 1}
82 {$elsec}
83   {$setc __LP64__ := 0}
84 {$endc}
85 
86 
87 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
88 	{$error Conflicting definitions for __ppc__ and __i386__}
89 {$endc}
90 
91 {$ifc defined __ppc__ and __ppc__}
92 	{$setc TARGET_CPU_PPC := TRUE}
93 	{$setc TARGET_CPU_PPC64 := FALSE}
94 	{$setc TARGET_CPU_X86 := FALSE}
95 	{$setc TARGET_CPU_X86_64 := FALSE}
96 	{$setc TARGET_CPU_ARM := FALSE}
97 	{$setc TARGET_CPU_ARM64 := FALSE}
98 	{$setc TARGET_OS_MAC := TRUE}
99 	{$setc TARGET_OS_IPHONE := FALSE}
100 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
101 	{$setc TARGET_OS_EMBEDDED := FALSE}
102 {$elifc defined __ppc64__ and __ppc64__}
103 	{$setc TARGET_CPU_PPC := FALSE}
104 	{$setc TARGET_CPU_PPC64 := TRUE}
105 	{$setc TARGET_CPU_X86 := FALSE}
106 	{$setc TARGET_CPU_X86_64 := FALSE}
107 	{$setc TARGET_CPU_ARM := FALSE}
108 	{$setc TARGET_CPU_ARM64 := FALSE}
109 	{$setc TARGET_OS_MAC := TRUE}
110 	{$setc TARGET_OS_IPHONE := FALSE}
111 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
112 	{$setc TARGET_OS_EMBEDDED := FALSE}
113 {$elifc defined __i386__ and __i386__}
114 	{$setc TARGET_CPU_PPC := FALSE}
115 	{$setc TARGET_CPU_PPC64 := FALSE}
116 	{$setc TARGET_CPU_X86 := TRUE}
117 	{$setc TARGET_CPU_X86_64 := FALSE}
118 	{$setc TARGET_CPU_ARM := FALSE}
119 	{$setc TARGET_CPU_ARM64 := FALSE}
120 {$ifc defined iphonesim}
121  	{$setc TARGET_OS_MAC := FALSE}
122 	{$setc TARGET_OS_IPHONE := TRUE}
123 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
124 {$elsec}
125 	{$setc TARGET_OS_MAC := TRUE}
126 	{$setc TARGET_OS_IPHONE := FALSE}
127 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
128 {$endc}
129 	{$setc TARGET_OS_EMBEDDED := FALSE}
130 {$elifc defined __x86_64__ and __x86_64__}
131 	{$setc TARGET_CPU_PPC := FALSE}
132 	{$setc TARGET_CPU_PPC64 := FALSE}
133 	{$setc TARGET_CPU_X86 := FALSE}
134 	{$setc TARGET_CPU_X86_64 := TRUE}
135 	{$setc TARGET_CPU_ARM := FALSE}
136 	{$setc TARGET_CPU_ARM64 := FALSE}
137 {$ifc defined iphonesim}
138  	{$setc TARGET_OS_MAC := FALSE}
139 	{$setc TARGET_OS_IPHONE := TRUE}
140 	{$setc TARGET_IPHONE_SIMULATOR := TRUE}
141 {$elsec}
142 	{$setc TARGET_OS_MAC := TRUE}
143 	{$setc TARGET_OS_IPHONE := FALSE}
144 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
145 {$endc}
146 	{$setc TARGET_OS_EMBEDDED := FALSE}
147 {$elifc defined __arm__ and __arm__}
148 	{$setc TARGET_CPU_PPC := FALSE}
149 	{$setc TARGET_CPU_PPC64 := FALSE}
150 	{$setc TARGET_CPU_X86 := FALSE}
151 	{$setc TARGET_CPU_X86_64 := FALSE}
152 	{$setc TARGET_CPU_ARM := TRUE}
153 	{$setc TARGET_CPU_ARM64 := FALSE}
154 	{$setc TARGET_OS_MAC := FALSE}
155 	{$setc TARGET_OS_IPHONE := TRUE}
156 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
157 	{$setc TARGET_OS_EMBEDDED := TRUE}
158 {$elifc defined __arm64__ and __arm64__}
159 	{$setc TARGET_CPU_PPC := FALSE}
160 	{$setc TARGET_CPU_PPC64 := FALSE}
161 	{$setc TARGET_CPU_X86 := FALSE}
162 	{$setc TARGET_CPU_X86_64 := FALSE}
163 	{$setc TARGET_CPU_ARM := FALSE}
164 	{$setc TARGET_CPU_ARM64 := TRUE}
165 {$ifc defined ios}
166 	{$setc TARGET_OS_MAC := FALSE}
167 	{$setc TARGET_OS_IPHONE := TRUE}
168 	{$setc TARGET_OS_EMBEDDED := TRUE}
169 {$elsec}
170 	{$setc TARGET_OS_MAC := TRUE}
171 	{$setc TARGET_OS_IPHONE := FALSE}
172 	{$setc TARGET_OS_EMBEDDED := FALSE}
173 {$endc}
174 	{$setc TARGET_IPHONE_SIMULATOR := FALSE}
175 {$elsec}
176 	{$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
177 {$endc}
178 
179 {$ifc defined __LP64__ and __LP64__ }
180   {$setc TARGET_CPU_64 := TRUE}
181 {$elsec}
182   {$setc TARGET_CPU_64 := FALSE}
183 {$endc}
184 
185 {$ifc defined FPC_BIG_ENDIAN}
186 	{$setc TARGET_RT_BIG_ENDIAN := TRUE}
187 	{$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
188 {$elifc defined FPC_LITTLE_ENDIAN}
189 	{$setc TARGET_RT_BIG_ENDIAN := FALSE}
190 	{$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
191 {$elsec}
192 	{$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
193 {$endc}
194 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
195 {$setc CALL_NOT_IN_CARBON := FALSE}
196 {$setc OLDROUTINENAMES := FALSE}
197 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
198 {$setc OPAQUE_UPP_TYPES := TRUE}
199 {$setc OTCARBONAPPLICATION := TRUE}
200 {$setc OTKERNEL := FALSE}
201 {$setc PM_USE_SESSION_APIS := TRUE}
202 {$setc TARGET_API_MAC_CARBON := TRUE}
203 {$setc TARGET_API_MAC_OS8 := FALSE}
204 {$setc TARGET_API_MAC_OSX := TRUE}
205 {$setc TARGET_CARBON := TRUE}
206 {$setc TARGET_CPU_68K := FALSE}
207 {$setc TARGET_CPU_MIPS := FALSE}
208 {$setc TARGET_CPU_SPARC := FALSE}
209 {$setc TARGET_OS_UNIX := FALSE}
210 {$setc TARGET_OS_WIN32 := FALSE}
211 {$setc TARGET_RT_MAC_68881 := FALSE}
212 {$setc TARGET_RT_MAC_CFM := FALSE}
213 {$setc TARGET_RT_MAC_MACHO := TRUE}
214 {$setc TYPED_FUNCTION_POINTERS := TRUE}
215 {$setc TYPE_BOOL := FALSE}
216 {$setc TYPE_EXTENDED := FALSE}
217 {$setc TYPE_LONGLONG := TRUE}
218 uses MacTypes,CFBase,CFURL,CFArray,CFData,CFString,CFDictionary,CGBase,AEDataModel,TextCommon,QuickdrawTypes,QDOffscreen,Menus,ATSUnicodeTypes,ConditionalMacros,Drag,MacWindows,Files,Events,MacErrors,CarbonEvents,HIObject,HIView,HIGeometry;
219 {$endc} {not MACOSALLINCLUDE}
220 
221 {$ALIGN POWER}
222 
223 {$ifc TARGET_OS_MAC}
224 
225 {$ALIGN MAC68K}
226 
227 
228 {������������������������������������������������������������������������������������������������������}
229 {  � Various Defs                                                                                      }
230 {������������������������������������������������������������������������������������������������������}
231 type
232 	TXNObject = ^OpaqueTXNObject; { an opaque type }
233 	OpaqueTXNObject = record end;
234 	TXNObjectPtr = ^TXNObject;  { when a var xx:TXNObject parameter can be nil, it is changed to xx: TXNObjectPtr }
235 type
236 	TXNVersionValue = UInt32;
237 
238 {
239  *  TXNFrameID
240  *
241  *  Summary:
242  *    Deprecated.  Pass NULL for any API which uses this type as a
243  *    parameter.
244  }
245 type
246 	TXNFrameID = UInt32;
247 {������������������������������������������������������������������������������������������������������}
248 {  � Error Status                                                                                      }
249 {������������������������������������������������������������������������������������������������������}
250 {  MLTE status errors assigned is -22000 through -22039.  See MacErrors.h for -22000 to -22018.        }
251 
252 const
253 	kTXNDisabledFunctionalityErr = -22019; { This routine's functionality is disabled.}
254 	kTXNOperationNotAllowedErr = -22020; { Returned by MLTE API if function cannot be applied. }
255 
256 {������������������������������������������������������������������������������������������������������}
257 {  � Feature Bits                                                                                      }
258 {������������������������������������������������������������������������������������������������������}
259 {  Useful for the TXNVersionInformation API.                                                           }
260 
261 const
262 	kTXNWillDefaultToATSUIBit = 0;
263 	kTXNWillDefaultToCarbonEventBit = 1;   { Ignored - Carbon events are always used in Mac OS X version 10.1 and later.}
264 
265 type
266 	TXNFeatureBits = OptionBits;
267 const
268 	kTXNWillDefaultToATSUIMask = 1 shl kTXNWillDefaultToATSUIBit;
269 	kTXNWillDefaultToCarbonEventMask = 1 shl kTXNWillDefaultToCarbonEventBit;
270 
271 {$ifc not TARGET_CPU_64}
272 {������������������������������������������������������������������������������������������������������}
273 {  � Initialization Bits                                                                               }
274 {������������������������������������������������������������������������������������������������������}
275 {  Useful for the TXNInitTextension API.                                                               }
276 
277 const
278 	kTXNWantMoviesBit = 0;
279 	kTXNWantSoundBit = 1;
280 	kTXNWantGraphicsBit = 2;
281 	kTXNAlwaysUseQuickDrawTextBit = 3;
282 	kTXNUseTemporaryMemoryBit = 4;
283 
284 type
285 	TXNInitOptions = OptionBits;
286 const
287 	kTXNWantMoviesMask = 1 shl kTXNWantMoviesBit;
288 	kTXNWantSoundMask = 1 shl kTXNWantSoundBit;
289 	kTXNWantGraphicsMask = 1 shl kTXNWantGraphicsBit;
290 	kTXNAlwaysUseQuickDrawTextMask = 1 shl kTXNAlwaysUseQuickDrawTextBit;
291 	kTXNUseTemporaryMemoryMask = 1 shl kTXNUseTemporaryMemoryBit;
292 
293 { Default constants}
294 
295 const
296 	kTXNDefaultFontName = nil;
297 
298 const
299 	kTXNDefaultFontSize = $000C0000;
300 
301 const
302 	kTXNDefaultFontStyle = normal;
303 
304 {$endc} {not TARGET_CPU_64}
305 {������������������������������������������������������������������������������������������������������}
306 {  � FrameOption Bits                                                                                  }
307 {������������������������������������������������������������������������������������������������������}
308 {  Useful for the TXNNewObject and TXNCreateObject APIs.                                               }
309 
310 const
311 	kTXNDrawGrowIconBit = 0;
312 	kTXNShowWindowBit = 1;
313 	kTXNWantHScrollBarBit = 2;
314 	kTXNWantVScrollBarBit = 3;
315 	kTXNReadOnlyBit = 5;
316 	kTXNNoSelectionBit = 7;
317 	kTXNSaveStylesAsSTYLResourceBit = 8;
318 	kOutputTextInUnicodeEncodingBit = 9;
319 	kTXNDoNotInstallDragProcsBit = 10;
320 	kTXNAlwaysWrapAtViewEdgeBit = 11;
321 	kTXNDontDrawSelectionWhenInactiveBit = 13;
322 	kTXNSingleLineOnlyBit = 14;
323 	kTXNDisableDragAndDropBit = 15;
324 	kTXNMonostyledTextBit = 17;
325 	kTXNDoFontSubstitutionBit = 22;
326 
327 
328 {
329  *  TXNFrameOptions
330  *
331  *  Summary:
332  *    Defines the initial behavior of an MLTE object created with
333  *    TXNCreateObject/TXNNewObject.
334  *
335  *  Discussion:
336  *    These masks can be combined and passed to
337  *    TXNCreateObject/TXNNewObject to define the initial behavior of a
338  *    new object.
339  }
340 type
341 	TXNFrameOptions = OptionBits;
342 const
343 {
344    * Indicates that the frame will have a size box.
345    }
346 	kTXNDrawGrowIconMask = 1 shl kTXNDrawGrowIconBit;
347 
348   {
349    * Indicates that the window associated with the text object will be
350    * displayed when the object is created.  The application no longer
351    * needs to call the ShowWindow function from the Window Manager;
352    * MLTE will do this for you.
353    }
354 	kTXNShowWindowMask = 1 shl kTXNShowWindowBit;
355 
356   {
357    * Indicates that the frame will have a horizontal scrollbar. The
358    * scrollbar will be enabled upon creation.  If there are multiple
359    * MLTE objects in the same window, the client will need to
360    * explicitly disable the scrollbars for those inactive MLTE objects.
361    *  Use TXNSetScrollbarState to deactivate the scrollbar.
362    }
363 	kTXNWantHScrollBarMask = 1 shl kTXNWantHScrollBarBit;
364 
365   {
366    * Indicates that the frame will have a vertical scrollbar. The
367    * scrollbar will be enabled upon creation.  If there are multiple
368    * MLTE objects in the same window, the client will need to
369    * explicitly disable the scrollbars for those inactive MLTE objects.
370    *  Use TXNSetScrollbarState to deactivate the scrollbar.
371    }
372 	kTXNWantVScrollBarMask = 1 shl kTXNWantVScrollBarBit;
373 
374   {
375    * Indicates that the text object will be read-only.  It is
376    * equivalent to setting the object into NoUserIO mode, via the tag
377    * kTXNNoUserIOTag in TXNSetTXNObjectControls. See description in
378    * individual API to determine if the API will still work in NoUserIO
379    * mode.
380    }
381 	kTXNReadOnlyMask = 1 shl kTXNReadOnlyBit;
382 
383   {
384    * Indicates that the user shouldn't be able to set the insertion
385    * point or make a selection.
386    }
387 	kTXNNoSelectionMask = 1 shl kTXNNoSelectionBit;
388 
389   {
390    * Indicates that the text style will be saved as a
391    * kTXNMultipleStylesPerTextDocumentResType resource.  You can set
392    * this to assure compatibility with SimpleText.  If you use
393    * kTXNMultipleStylesPerTextDocumentResType resources to save style
394    * info, your documents can have as many styles as you'd like.
395    * However tabs are not saved.  If you don't use this mask, plain
396    * text files are saved as kTXNSingleStylePerTextDocumentResType
397    * resources, and only the first style in the document is saved.
398    * (Your application is expected to apply all style changes to the
399    * entire document.)  If you save files with a
400    * kTXNSingleStylePerTextDocumentResType resource, their output is
401    * similar to those output by CodeWarrior, BBEdit, and MPW.
402    }
403 	kTXNSaveStylesAsSTYLResourceMask = 1 shl kTXNSaveStylesAsSTYLResourceBit;
404 
405   {
406    * Indicates that plain text will be saved as Unicode.
407    }
408 	kOutputTextInUnicodeEncodingMask = 1 shl kOutputTextInUnicodeEncodingBit;
409 
410   {
411    * Indicates that MLTE will not install its own drag handler for the
412    * text object.  This can be used if the client wants to install
413    * their own handler.
414    }
415 	kTXNDoNotInstallDragProcsMask = 1 shl kTXNDoNotInstallDragProcsBit;
416 
417   {
418    * Indicates that lines will wrap at the edge of the view rectangle.
419    }
420 	kTXNAlwaysWrapAtViewEdgeMask = 1 shl kTXNAlwaysWrapAtViewEdgeBit;
421 
422   {
423    * Indicates that the selection (if one) shouldn't be drawn when the
424    * text object doesn't have focus.
425    }
426 	kTXNDontDrawSelectionWhenInactiveMask = 1 shl kTXNDontDrawSelectionWhenInactiveBit;
427 
428   {
429    * Indicates that the text object will not scroll vertically,
430    * horizontal scrolling will stop when the end of the text is visible
431    * (plus any right margin), and there will be no limit to the width
432    * of the text.
433    }
434 	kTXNSingleLineOnlyMask = 1 shl kTXNSingleLineOnlyBit;
435 
436   {
437    * Indicates that drag and drop will not be allowed in the text
438    * object.
439    }
440 	kTXNDisableDragAndDropMask = 1 shl kTXNDisableDragAndDropBit;
441 
442   {
443    * Indicates that the text object will keep in single style no matter
444    * what kind of changes made to the object.  Mac OS X only.
445    }
446 	kTXNMonostyledTextMask = 1 shl kTXNMonostyledTextBit;
447 
448   {
449    * Indicates that ATSUI font substitution will be used.  Mac OS X
450    * only.
451    }
452 	kTXNDoFontSubstitutionMask = 1 shl kTXNDoFontSubstitutionBit;
453 
454 {������������������������������������������������������������������������������������������������������}
455 {  � TextBox Option Bits                                                                               }
456 {������������������������������������������������������������������������������������������������������}
457 {  Useful for TXNDrawUnicodeTextBox and TXNDrawCFStringTextBox APIs. 32 bit only                       }
458 {$ifc not TARGET_CPU_64}
459 const
460 	kTXNSetFlushnessBit = 0;
461 	kTXNSetJustificationBit = 1;
462 	kTXNUseFontFallBackBit = 2;
463 	kTXNRotateTextBit = 3;
464 	kTXNUseVerticalTextBit = 4;
465 	kTXNDontUpdateBoxRectBit = 5;
466 	kTXNDontDrawTextBit = 6;
467 	kTXNUseCGContextRefBit = 7;
468 	kTXNDontWrapTextBit = 9;
469 
470 {$endc} {not TARGET_CPU_64}
471 
472 {$ifc not TARGET_CPU_64}
473 {
474  *  TXNTextBoxOptions
475  *
476  *  Summary:
477  *    Defines how text will be drawn by the TXNDrawUnicodeTextBox and
478  *    TXNDrawCFStringTextBox APIs.
479  *
480  *  Discussion:
481  *    These masks can be combined and added to a TXNTextBoxOptionsData
482  *    structure to be passed to the TXNDrawUnicodeTextBox and
483  *    TXNDrawCFStringTextBox APIs.
484  }
485 type
486 	TXNTextBoxOptions = OptionBits;
487 const
488 {
489    * Indicates that the text will be flush according to the line
490    * direction.
491    }
492 	kTXNSetFlushnessMask = 1 shl kTXNSetFlushnessBit;
493 
494   {
495    * Indicates that the text will be justified in the direction that
496    * the text is displayed.  Horizontal text will be justified
497    * horizontally, but not vertically.  Vertical text will be justified
498    * vertically, but not horizontally.
499    }
500 	kTXNSetJustificationMask = 1 shl kTXNSetJustificationBit;
501 
502   {
503    * Indicates that ATSUI font substitution (that searches for a font
504    * that has a matching character) will be used.
505    }
506 	kTXNUseFontFallBackMask = 1 shl kTXNUseFontFallBackBit;
507 
508   {
509    * Indicates that the text will be rotated.  The amount of rotation
510    * is given in the rotation field of the TXNTextBoxOptionsData
511    * structure and is in units of degrees (negative values indicate
512    * clockwise rotation).
513    }
514 	kTXNRotateTextMask = 1 shl kTXNRotateTextBit;
515 
516   {
517    * Indicates that the text will be displayed vertically from top to
518    * bottom.
519    }
520 	kTXNUseVerticalTextMask = 1 shl kTXNUseVerticalTextBit;
521 
522   {
523    * Indicates that the specified rectangle will not be updated.  If
524    * you use this mask when you call a TXNDrawxxxTextBox function, the
525    * function does not update the right coordinate (bottom coordinate
526    * if kTXNUseVerticalTextMask is used) of the specified rectangle to
527    * accommodate the longest line for text.
528    }
529 	kTXNDontUpdateBoxRectMask = 1 shl kTXNDontUpdateBoxRectBit;
530 
531   {
532    * Indicates that the size of the text will be returned but the text
533    * box will not be drawn.
534    }
535 	kTXNDontDrawTextMask = 1 shl kTXNDontDrawTextBit;
536 
537   {
538    * Indicates that the client has provided a CGContext to be used for
539    * CG imaging inside the text box.  Pass the CGContextRef in the
540    * options field of the TXNTextBoxOptionsData structure.  Mac OS X
541    * only.
542    }
543 	kTXNUseCGContextRefMask = 1 shl kTXNUseCGContextRefBit;
544 
545   {
546    * Indicates that text should not be wrapped.  Mac OS X only.
547    }
548 	kTXNDontWrapTextMask = 1 shl kTXNDontWrapTextBit;
549 
550 {$endc} {not TARGET_CPU_64}
551 
552 {������������������������������������������������������������������������������������������������������}
553 {  � TextBox Options Data                                                                              }
554 {������������������������������������������������������������������������������������������������������}
555 
556 {$ifc not TARGET_CPU_64}
557 type
558 	TXNTextBoxOptionsDataPtr = ^TXNTextBoxOptionsData;
559 	TXNTextBoxOptionsData = record
560 		optionTags: TXNTextBoxOptions;
561 		flushness: Fract;
562 		justification: Fract;
563 		rotation: Fixed;
564 		options: UnivPtr;
565 	end;
566 {$endc} {not TARGET_CPU_64}
567 
568 {������������������������������������������������������������������������������������������������������}
569 {  � File Types                                                                                        }
570 {������������������������������������������������������������������������������������������������������}
571 
572 {
573  *  TXNFileType
574  *
575  *  Discussion:
576  *    Useful for TXNNewObject and TXNSave APIs.
577  }
578 type
579 	TXNFileType = OSType;
580 const
581 	kTXNTextFile = FourCharCode('TEXT');
582 	kTXNAIFFFile = FourCharCode('AIFF');
583 	kTXNUnicodeTextFile = FourCharCode('utxt');
584 	kTXNTextensionFile = FourCharCode('txtn');
585 
586 {$ifc not TARGET_CPU_64}
587 const
588 	kTXNPictureFile = FourCharCode('PICT');
589 	kTXNMovieFile = FourCharCode('MooV');
590 	kTXNSoundFile = FourCharCode('sfil');
591 
592 {$endc} {not TARGET_CPU_64}
593 
594 {������������������������������������������������������������������������������������������������������}
595 {  � Text Encoding Types                                                                               }
596 {������������������������������������������������������������������������������������������������������}
597 
598 {
599  *  TXNPermanentTextEncodingType
600  *
601  *  Discussion:
602  *    Useful for TXNNewObject and TXNSave APIs.
603  }
604 type
605 	TXNPermanentTextEncodingType = UInt32;
606 const
607 	kTXNSystemDefaultEncoding = 0;
608 	kTXNMacOSEncoding = 1;
609 	kTXNUnicodeEncoding = 2;
610 
611 {������������������������������������������������������������������������������������������������������}
612 {  � Data Types                                                                                        }
613 {������������������������������������������������������������������������������������������������������}
614 
615 type
616 	TXNDataTypePtr = ^TXNDataType;
617 	TXNDataType = OSType;
618 const
619 	kTXNTextData = FourCharCode('TEXT');
620 	kTXNUnicodeTextData = FourCharCode('utxt');
621 	kTXNRichTextFormatData = FourCharCode('RTF ');
622 
623 {$ifc not TARGET_CPU_64}
624 const
625 	kTXNPictureData = FourCharCode('PICT');
626 	kTXNMovieData = FourCharCode('moov');
627 	kTXNSoundData = FourCharCode('snd ');
628 	kTXNTextAndMultimediaData = FourCharCode('txtn');
629 
630 {$endc} {not TARGET_CPU_64}
631 
632 
633 {������������������������������������������������������������������������������������������������������}
634 {  � Action constants used in undo/redo functions                                                      }
635 {  In Mac OS X version 10.4 and later TXNActionKey is deprecated.                                          }
636 {  The following action constants should be used instead.                                              }
637 {������������������������������������������������������������������������������������������������������}
638 
639 {
640  *  kTXNActionTyping
641  *
642  *  Discussion:
643  *    Denotes a typing action.
644  *
645  *  Mac OS X threading:
646  *    Not thread safe
647  *
648  *  Availability:
649  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
650  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
651  *    Non-Carbon CFM:   not available
652  }
653 var kTXNActionTyping: CFStringRef; external name '_kTXNActionTyping'; (* attribute const *)
654 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
655 
656 {
657  *  kTXNActionCut
658  *
659  *  Discussion:
660  *    Denotes a cut action.
661  *
662  *  Mac OS X threading:
663  *    Not thread safe
664  *
665  *  Availability:
666  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
667  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
668  *    Non-Carbon CFM:   not available
669  }
670 var kTXNActionCut: CFStringRef; external name '_kTXNActionCut'; (* attribute const *)
671 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
672 
673 {
674  *  kTXNActionPaste
675  *
676  *  Discussion:
677  *    Denotes a paste action.
678  *
679  *  Mac OS X threading:
680  *    Not thread safe
681  *
682  *  Availability:
683  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
684  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
685  *    Non-Carbon CFM:   not available
686  }
687 var kTXNActionPaste: CFStringRef; external name '_kTXNActionPaste'; (* attribute const *)
688 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
689 
690 {
691  *  kTXNActionClear
692  *
693  *  Discussion:
694  *    Denotes a clear action.
695  *
696  *  Mac OS X threading:
697  *    Not thread safe
698  *
699  *  Availability:
700  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
701  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
702  *    Non-Carbon CFM:   not available
703  }
704 var kTXNActionClear: CFStringRef; external name '_kTXNActionClear'; (* attribute const *)
705 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
706 
707 {
708  *  kTXNActionChangeFont
709  *
710  *  Discussion:
711  *    Denotes a change font action.
712  *
713  *  Mac OS X threading:
714  *    Not thread safe
715  *
716  *  Availability:
717  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
718  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
719  *    Non-Carbon CFM:   not available
720  }
721 var kTXNActionChangeFont: CFStringRef; external name '_kTXNActionChangeFont'; (* attribute const *)
722 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
723 
724 {
725  *  kTXNActionChangeColor
726  *
727  *  Discussion:
728  *    Denotes a change color action.
729  *
730  *  Mac OS X threading:
731  *    Not thread safe
732  *
733  *  Availability:
734  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
735  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
736  *    Non-Carbon CFM:   not available
737  }
738 var kTXNActionChangeColor: CFStringRef; external name '_kTXNActionChangeColor'; (* attribute const *)
739 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
740 
741 {
742  *  kTXNActionChangeSize
743  *
744  *  Discussion:
745  *    Denotes a change size action.
746  *
747  *  Mac OS X threading:
748  *    Not thread safe
749  *
750  *  Availability:
751  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
752  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
753  *    Non-Carbon CFM:   not available
754  }
755 var kTXNActionChangeSize: CFStringRef; external name '_kTXNActionChangeSize'; (* attribute const *)
756 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
757 
758 {
759  *  kTXNActionChangeStyle
760  *
761  *  Discussion:
762  *    Denotes a change style action.
763  *
764  *  Mac OS X threading:
765  *    Not thread safe
766  *
767  *  Availability:
768  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
769  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
770  *    Non-Carbon CFM:   not available
771  }
772 var kTXNActionChangeStyle: CFStringRef; external name '_kTXNActionChangeStyle'; (* attribute const *)
773 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
774 
775 {
776  *  kTXNActionAlignLeft
777  *
778  *  Discussion:
779  *    Denotes an align left action.
780  *
781  *  Mac OS X threading:
782  *    Not thread safe
783  *
784  *  Availability:
785  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
786  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
787  *    Non-Carbon CFM:   not available
788  }
789 var kTXNActionAlignLeft: CFStringRef; external name '_kTXNActionAlignLeft'; (* attribute const *)
790 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
791 
792 {
793  *  kTXNActionAlignCenter
794  *
795  *  Discussion:
796  *    Denotes an align center action.
797  *
798  *  Mac OS X threading:
799  *    Not thread safe
800  *
801  *  Availability:
802  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
803  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
804  *    Non-Carbon CFM:   not available
805  }
806 var kTXNActionAlignCenter: CFStringRef; external name '_kTXNActionAlignCenter'; (* attribute const *)
807 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
808 
809 {
810  *  kTXNActionAlignRight
811  *
812  *  Discussion:
813  *    Denotes an align right action.
814  *
815  *  Mac OS X threading:
816  *    Not thread safe
817  *
818  *  Availability:
819  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
820  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
821  *    Non-Carbon CFM:   not available
822  }
823 var kTXNActionAlignRight: CFStringRef; external name '_kTXNActionAlignRight'; (* attribute const *)
824 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
825 
826 {
827  *  kTXNActionDrop
828  *
829  *  Discussion:
830  *    Denotes a drop action.
831  *
832  *  Mac OS X threading:
833  *    Not thread safe
834  *
835  *  Availability:
836  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
837  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
838  *    Non-Carbon CFM:   not available
839  }
840 var kTXNActionDrop: CFStringRef; external name '_kTXNActionDrop'; (* attribute const *)
841 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
842 
843 {
844  *  kTXNActionMove
845  *
846  *  Discussion:
847  *    Denotes a move action.
848  *
849  *  Mac OS X threading:
850  *    Not thread safe
851  *
852  *  Availability:
853  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
854  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
855  *    Non-Carbon CFM:   not available
856  }
857 var kTXNActionMove: CFStringRef; external name '_kTXNActionMove'; (* attribute const *)
858 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
859 
860 {
861  *  kTXNActionChangeFontFeature
862  *
863  *  Discussion:
864  *    Denotes a change font feature action.
865  *
866  *  Mac OS X threading:
867  *    Not thread safe
868  *
869  *  Availability:
870  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
871  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
872  *    Non-Carbon CFM:   not available
873  }
874 var kTXNActionChangeFontFeature: CFStringRef; external name '_kTXNActionChangeFontFeature'; (* attribute const *)
875 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
876 
877 {
878  *  kTXNActionChangeFontVariation
879  *
880  *  Discussion:
881  *    Denotes a change font variation action.
882  *
883  *  Mac OS X threading:
884  *    Not thread safe
885  *
886  *  Availability:
887  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
888  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
889  *    Non-Carbon CFM:   not available
890  }
891 var kTXNActionChangeFontVariation: CFStringRef; external name '_kTXNActionChangeFontVariation'; (* attribute const *)
892 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
893 
894 {
895  *  kTXNActionChangeGlyphVariation
896  *
897  *  Discussion:
898  *    Denotes a change glyph variation action.
899  *
900  *  Mac OS X threading:
901  *    Not thread safe
902  *
903  *  Availability:
904  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
905  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
906  *    Non-Carbon CFM:   not available
907  }
908 var kTXNActionChangeGlyphVariation: CFStringRef; external name '_kTXNActionChangeGlyphVariation'; (* attribute const *)
909 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
910 
911 {
912  *  kTXNActionChangeTextPosition
913  *
914  *  Discussion:
915  *    Denotes a change text's position action, which includes changing
916  *    the space before/after characters and shifting the text's
917  *    baseline.
918  *
919  *  Mac OS X threading:
920  *    Not thread safe
921  *
922  *  Availability:
923  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
924  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
925  *    Non-Carbon CFM:   not available
926  }
927 var kTXNActionChangeTextPosition: CFStringRef; external name '_kTXNActionChangeTextPosition'; (* attribute const *)
928 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
929 
930 {
931  *  kTXNActionUndoLast
932  *
933  *  Discussion:
934  *    Used in undo/redo functions if none of the other constants apply.
935  *
936  *  Mac OS X threading:
937  *    Not thread safe
938  *
939  *  Availability:
940  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
941  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
942  *    Non-Carbon CFM:   not available
943  }
944 var kTXNActionUndoLast: CFStringRef; external name '_kTXNActionUndoLast'; (* attribute const *)
945 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
946 
947 
948 {������������������������������������������������������������������������������������������������������}
949 {  � Format Setting Constants                                                                          }
950 {������������������������������������������������������������������������������������������������������}
951 
952 type
953 	TXNTabType = SInt8;
954 const
955 	kTXNRightTab = -1;
956 	kTXNLeftTab = 0;
957 	kTXNCenterTab = 1;
958 
959 type
960 	TXNTabPtr = ^TXNTab;
961 	TXNTab = record
962 		value: SInt16;
963 		tabType: TXNTabType;
964 		filler: UInt8;
965 	end;
966 const
967 	kTXNLeftToRight = 0;
968 	kTXNRightToLeft = 1;
969 
970 const
971 	kTXNFlushDefault = 0;    { Flush according to the line direction    }
972 	kTXNFlushLeft = 1;
973 	kTXNFlushRight = 2;
974 	kTXNCenter = 4;
975 	kTXNFullJust = 8;
976 	kTXNForceFullJust = 16;    { Flush left and right for all lines   }
977 
978 
979 {
980  *  TXNMargins
981  *
982  *  Discussion:
983  *    In MLTE version 1.2 and later you can change the top, left and
984  *    right margins.
985  }
986 type
987 	TXNMarginsPtr = ^TXNMargins;
988 	TXNMargins = record
989 		topMargin: SInt16;
990 		leftMargin: SInt16;
991 		bottomMargin: SInt16;
992 
993   {
994    * The bottom margin is a placeholder for possible future
995    * enhancements.
996    }
997 		rightMargin: SInt16;
998 	end;
999 
1000 {������������������������������������������������������������������������������������������������������}
1001 {  � Control Tags                                                                                      }
1002 {������������������������������������������������������������������������������������������������������}
1003 
1004 {
1005  *  TXNControlTag
1006  *
1007  }
1008 type
1009 	TXNControlTag = FourCharCode;
1010 	TXNControlTagPtr = ^TXNControlTag; { when a VAR xx: TXNControlTag parameter can be nil, it is changed to xx: TXNControlTagPtr }
1011 const
1012 	kTXNLineDirectionTag = FourCharCode('lndr'); { Not functional when userIO is not allowed   }
1013 	kTXNJustificationTag = FourCharCode('just'); { Not functional when userIO is not allowed   }
1014 	kTXNIOPrivilegesTag = FourCharCode('iopv');
1015 	kTXNSelectionStateTag = FourCharCode('slst');
1016 	kTXNInlineStateTag = FourCharCode('inst');
1017 	kTXNWordWrapStateTag = FourCharCode('wwrs');
1018 	kTXNAutoIndentStateTag = FourCharCode('auin');
1019 	kTXNTabSettingsTag = FourCharCode('tabs');
1020 	kTXNRefConTag = FourCharCode('rfcn');
1021 	kTXNMarginsTag = FourCharCode('marg');
1022 	kTXNFlattenMoviesTag = FourCharCode('flat');
1023 	kTXNDoFontSubstitution = FourCharCode('fSub'); { Note: This can degrade performance greatly in the case of large documents }
1024 	kTXNNoUserIOTag = FourCharCode('nuio');
1025 
1026   {
1027    * In Mac OS X version 10.4 and later this constant is deprecated.
1028    * The functions TXNSetEventTarget and TXNGetEventTarget should be
1029    * used instead.
1030    }
1031 	kTXNUseCarbonEvents = FourCharCode('cbcb');
1032 	kTXNDrawSelectionWhenInactiveTag = FourCharCode('dsln');
1033 	kTXNDisableDragAndDropTag = FourCharCode('drag');
1034 	kTXNSingleLevelUndoTag = FourCharCode('undo'); { Set this state during creation of the object.  Switching Undo level back and forth is not recommended.}
1035 	kTXNVisibilityTag = FourCharCode('visb'); { Set the visibility state of the object }
1036 
1037   {
1038    * In Mac OS X version 10.4 or later use this tag to disable and
1039    * re-enable layout and drawing. It optimizes performance when adding
1040    * data incrementally to a text object.
1041    }
1042 	kTXNDisableLayoutAndDrawTag = kTXNVisibilityTag; { Turn on / off layout and drawing. Same as kTXNVisibilityTag but makes clear what the tag does}
1043 
1044   {
1045    * In Mac OS X version 10.4 or later use this constant to set
1046    * autoscroll behaviour.  See the discussion below for the enum
1047    * TXNAutoScrollBehavior for the types of autoscrolling supported.
1048    }
1049 	kTXNAutoScrollBehaviorTag = FourCharCode('sbev');
1050 
1051 
1052 {������������������������������������������������������������������������������������������������������}
1053 {  � Convenience Constants for TXNGet/SetTXNControls                                                   }
1054 {������������������������������������������������������������������������������������������������������}
1055 
1056 const
1057 	kTXNClearThisControl = $FFFFFFFF; { To clear an object control setting }
1058 	kTXNClearTheseFontFeatures = $80000000; { To clear ATSUI font feature(s) }
1059 
1060 { kTXNIOPrivilegesTag}
1061 const
1062 	kTXNReadWrite = false;
1063 	kTXNReadOnly = true;
1064 
1065 { kTXNSelectionStateTag}
1066 const
1067 	kTXNSelectionOn = true;
1068 	kTXNSelectionOff = false;
1069 
1070 { kTXNInlineStateTag}
1071 const
1072 	kTXNUseInline = false;
1073 	kTXNUseBottomline = true;
1074 
1075 { kTXNWordWrapStateTag}
1076 const
1077 	kTXNAutoWrap = false;
1078 	kTXNNoAutoWrap = true;
1079 
1080 { kTXNAutoIndentStateTag}
1081 const
1082 	kTXNAutoIndentOff = false;
1083 	kTXNAutoIndentOn = true;
1084 
1085 { kTXNDrawSelectionWhenInactiveTag}
1086 const
1087 	kTXNDontDrawSelectionWhenInactive = false;
1088 	kTXNDrawSelectionWhenInactive = true;
1089 
1090 { kTXNDisableDragAndDropTag}
1091 const
1092 	kTXNEnableDragAndDrop = false;
1093 	kTXNDisableDragAndDrop = true;
1094 
1095 {kTXNDisableLayoutAndDraw}
1096 const
1097 	kTXNDisableLayoutAndDraw = true;
1098 	kTXNEnableLayoutAndDraw = false;
1099 
1100 type
1101 	TXNControlDataPtr = ^TXNControlData;
1102 	TXNControlData = record
1103 		case SInt16 of
1104 		0: (
1105 			uValue: UNSIGNEDLONG;
1106 			);
1107 		1: (
1108 			sValue: SIGNEDLONG;
1109 			);
1110 		2: (
1111 			tabValue: TXNTab;
1112 			);
1113 		3: (
1114 			marginsPtr: TXNMarginsPtr;
1115 			);
1116 	end;
1117 
1118 {
1119  *  TXNAutoScrollBehavior
1120  *
1121  *  Summary:
1122  *    Set of values that can be passed to the function
1123  *    TXNSetTXNObjectControls along with the control tag
1124  *    kTXNAutoScrollBehaviorTag to control scrolling behavior.
1125  *
1126  *  Discussion:
1127  *    Beginning with Mac OS X version 10.4, MLTE supports 3 types of
1128  *    autoscroll behavior.  These are: always scroll a new insertion
1129  *    into view, only scroll if the insertion point was visible and the
1130  *    end of the new insertion is out of view, and never auto scroll
1131  *    under any circumstance.
1132  }
1133 type
1134 	TXNAutoScrollBehavior = UInt32;
1135 const
1136 {
1137    * The default auto scrolling behavior. When text is inserted the
1138    * document is scrolled to show the new insertion.  This was the only
1139    * type of autoscrolling prior to Mac OS X version 10.4.
1140    }
1141 	kTXNAutoScrollInsertionIntoView = 0;
1142 
1143   {
1144    * Never autoscroll.  This includes mouse dragging and text
1145    * insertion. The only way to scroll the document is for the user to
1146    * use the scrollbar or to scroll programatically.
1147    }
1148 	kTXNAutoScrollNever = 1;
1149 
1150   {
1151    * This type of autoscrolling is best for implementing terminal or
1152    * log windows. Autoscrolling only happens when the insertion offset
1153    * is currently in the users view.  This means that if the user is
1154    * looking at page 1 of a 10 page document and text is inserted at
1155    * the end of the document than no autoscrolling will occur. However,
1156    * if the user was looking at page 10 and text was inserted there the
1157    * document would scroll.
1158    }
1159 	kTXNAutoScrollWhenInsertionVisible = 2;
1160 
1161 
1162 {������������������������������������������������������������������������������������������������������}
1163 {  � Offset/Selection Constants                                                                        }
1164 {������������������������������������������������������������������������������������������������������}
1165 type
1166 	TXNOffset = UInt32;
1167 	TXNOffsetPtr				= ^TXNOffset; { when a VAR xx: TXNOffset parameter can be nil, it is changed to xx: TXNOffsetPtr }
1168 const
1169 	kTXNUseCurrentSelection = $FFFFFFFF;
1170 	kTXNStartOffset = 0;
1171 	kTXNEndOffset = $7FFFFFFF;
1172 
1173 { Useful for TXNShowSelection API.}
1174 const
1175 	kTXNShowStart = false;
1176 	kTXNShowEnd = true;
1177 
1178 {������������������������������������������������������������������������������������������������������}
1179 {  � Resource Constants                                                                                }
1180 {������������������������������������������������������������������������������������������������������}
1181 { Useful for saving document.                                                                          }
1182 
1183 const
1184 	kTXNSingleStylePerTextDocumentResType = FourCharCode('MPSR');
1185 	kTXNMultipleStylesPerTextDocumentResType = FourCharCode('styl');
1186 
1187 {������������������������������������������������������������������������������������������������������}
1188 {  � URL Constants                                                                                     }
1189 {������������������������������������������������������������������������������������������������������}
1190 
1191 {
1192  *  TXNHyperLinkState
1193  *
1194  *  Discussion:
1195  *    For future use.  Currently not available.
1196  }
1197 type
1198 	TXNHyperLinkState = UInt32;
1199 const
1200 	kTXNLinkNotPressed = 0;
1201 	kTXNLinkWasPressed = 1;
1202 	kTXNLinkTracking = 3;
1203 
1204 {������������������������������������������������������������������������������������������������������}
1205 {  � Type Attributes / ATSUI Features and Variations                                                   }
1206 {������������������������������������������������������������������������������������������������������}
1207 {  Since MLTE currently uses ATSUI by default, the available face types for kTXNQDFontStyleAttribute   }
1208 {  are limited by what's available in ATSUI.  Currently, MLTE supports types defined in MacTypes.h     }
1209 {  which are normal, bold, italic, underline, condensed, and extended.  An alternative is to use       }
1210 {  available QD compatibility tags defined in ATSUnicode.h.                                            }
1211 {  Deprecate all QD TXNTypeRunAttributes/TXNTypeRunAttributeSizes constants. Use kTXNATSUIStyle or     }
1212 {  ATSUI tags ATSUFontTag, kATSUColorTag and kATSUSizeTag to Set/Get the font, color or size           }
1213 type
1214 	TXNTypeRunAttributes = FourCharCode;
1215 const
1216 	kTXNTextEncodingAttribute = FourCharCode('encd');
1217 	kTXNATSUIFontFeaturesAttribute = FourCharCode('atfe');
1218 	kTXNATSUIFontVariationsAttribute = FourCharCode('atva');
1219 	kTXNURLAttribute = FourCharCode('urla');
1220 	kTXNATSUIStyle = FourCharCode('astl');
1221 
1222 type
1223 	TXNTypeRunAttributeSizes = ByteCount;
1224 const
1225 	kTXNTextEncodingAttributeSize = SizeOf(TextEncoding);
1226 	kTXNATSUIStyleSize = SizeOf(ATSUStyle);
1227 
1228 type
1229 	TXNATSUIFeaturesPtr = ^TXNATSUIFeatures;
1230 	TXNATSUIFeatures = record
1231 		featureCount: ItemCount;
1232 		featureTypes: ATSUFontFeatureTypePtr;
1233 		featureSelectors: ATSUFontFeatureSelectorPtr;
1234 	end;
1235 
1236 type
1237 	TXNATSUIVariationsPtr = ^TXNATSUIVariations;
1238 	TXNATSUIVariations = record
1239 		variationCount: ItemCount;
1240 		variationAxis: ATSUFontVariationAxisPtr;
1241 		variationValues: ATSUFontVariationValuePtr;
1242 	end;
1243 
1244 	TXNAttributeDataPtr = ^TXNAttributeData;
1245 	TXNAttributeData = record
1246 		case SInt16 of
1247 		0: (
1248 			dataPtr: UnivPtr;
1249 			);
1250 		1: (
1251 			dataValue: UInt32;
1252 			);
1253 		2: (
1254 			atsuFeatures: TXNATSUIFeaturesPtr;
1255 			);
1256 		3: (
1257 			atsuVariations: TXNATSUIVariationsPtr;
1258 			);
1259 		4: (
1260 			urlReference: CFURLRef;
1261 			);
1262 	end;
1263 
1264 type
1265 	TXNTypeAttributesPtr = ^TXNTypeAttributes;
1266 	TXNTypeAttributes = record
1267 		tag: TXNTypeRunAttributes;
1268 		size: ByteCount;
1269 		data: TXNAttributeData;
1270 	end;
1271 
1272 const
1273 	kTXNDontCareTypeSize = $FFFFFFFF;
1274 	kTXNDontCareTypeStyle = $FF;
1275 	kTXNIncrementTypeSize = $00000001;
1276 	kTXNDecrementTypeSize = $80000000;
1277 	kTXNUseScriptDefaultValue = -1;
1278 
1279   {
1280    * kTXNNoFontVariations is returned in the dataValue field when the
1281    * caller as asked to see if the variation is continuous and there
1282    * was no variation in the continuous range.
1283    }
1284 	kTXNNoFontVariations = $7FFF;
1285 
1286 {������������������������������������������������������������������������������������������������������}
1287 {  � Style Continuous Bits                                                                             }
1288 {������������������������������������������������������������������������������������������������������}
1289 { Useful for TXNGetContinuousTypeAttributes API.                                                       }
1290 
1291 const
1292 	kTXNFontContinuousBit = 0;
1293 	kTXNSizeContinuousBit = 1;
1294 	kTXNStyleContinuousBit = 2;
1295 	kTXNColorContinuousBit = 3;
1296 	kTXNATSUIStyleContinuousBit = 4;
1297 
1298 type
1299 	TXNContinuousFlags = OptionBits;
1300 const
1301 	kTXNFontContinuousMask = 1 shl kTXNFontContinuousBit;
1302 	kTXNSizeContinuousMask = 1 shl kTXNSizeContinuousBit;
1303 	kTXNStyleContinuousMask = 1 shl kTXNStyleContinuousBit;
1304 	kTXNColorContinuousMask = 1 shl kTXNColorContinuousBit;
1305 	kTXNATSUIStyleContinuousMask = 1 shl kTXNATSUIStyleContinuousBit;
1306 
1307 {������������������������������������������������������������������������������������������������������}
1308 {  � Match Options Bits                                                                                }
1309 {������������������������������������������������������������������������������������������������������}
1310 { Useful for TXNFind API.                                                                              }
1311 
1312 const
1313 	kTXNIgnoreCaseBit = 0;
1314 	kTXNEntireWordBit = 1;
1315 	kTXNUseEncodingWordRulesBit = 31;
1316 
1317 type
1318 	TXNMatchOptions = OptionBits;
1319 const
1320 	kTXNIgnoreCaseMask = 1 shl kTXNIgnoreCaseBit;
1321 	kTXNEntireWordMask = 1 shl kTXNEntireWordBit;
1322 	kTXNUseEncodingWordRulesMask = 1 shl kTXNUseEncodingWordRulesBit;
1323 
1324 type
1325 	TXNMatchTextRecordPtr = ^TXNMatchTextRecord;
1326 	TXNMatchTextRecord = record
1327 		iTextPtr: {const} UnivPtr;
1328 		iTextToMatchLength: SIGNEDLONG;
1329 		iTextEncoding: TextEncoding;
1330 	end;
1331 
1332 {������������������������������������������������������������������������������������������������������}
1333 {  � Font Description                                                                                  }
1334 {������������������������������������������������������������������������������������������������������}
1335 
1336 {$ifc not TARGET_CPU_64}
1337 type
1338 	TXNMacOSPreferredFontDescriptionPtr = ^TXNMacOSPreferredFontDescription;
1339 	TXNMacOSPreferredFontDescription = record
1340 		fontID: UInt32;
1341 		pointSize: Fixed;
1342 		encoding: TextEncoding;
1343 		fontStyle: Style;
1344 	end;
1345 {$endc} {not TARGET_CPU_64}
1346 
1347 {������������������������������������������������������������������������������������������������������}
1348 {  � Background                                                                                        }
1349 {������������������������������������������������������������������������������������������������������}
1350 
1351 {
1352  *  TXNBackgroundType
1353  *
1354  *  Discussion:
1355  *    Currently only an RGBColor is supported for the background.
1356  }
1357 type
1358 	TXNBackgroundType = UInt32;
1359 const
1360 	kTXNBackgroundTypeRGB = 1;
1361 
1362 
1363 {
1364  *  TXNBackgroundData
1365  *
1366  *  Discussion:
1367  *    The TXNBackgroundData is left as a union so that it can be
1368  *    expanded in the future to support other background types.
1369  }
1370 type
1371 	TXNBackgroundDataPtr = ^TXNBackgroundData;
1372 	TXNBackgroundData = record
1373 		case SInt16 of
1374 {
1375    * Currently only an RGBColor is supported.
1376    }
1377 		0: (
1378 			color: RGBColor;
1379 			);
1380 	end;
1381 
1382 type
1383 	TXNBackgroundPtr = ^TXNBackground;
1384 	TXNBackground = record
1385 		bgType: TXNBackgroundType;
1386 		bg: TXNBackgroundData;
1387 	end;
1388 
1389 
1390 {������������������������������������������������������������������������������������������������������}
1391 {  � Constants passed in iTXNActionName parameter of TXNGet/ClearCountForActionType                    }
1392 {    functions. In Mac OS X version 10.4 and later TXNCountOptions is deprecated.                      }
1393 {    The following action count constants should be used instead.                                      }
1394 {������������������������������������������������������������������������������������������������������}
1395 
1396 {
1397  *  kTXNActionCountOfTextChanges
1398  *
1399  *  Discussion:
1400  *    All text changes other than style changes and custom defined
1401  *    actions are included in this action count. Includes key presses,
1402  *    inline sessions, cut/copy/paste, and drop, etc. Undo or redo
1403  *    events of the kind listed above are also included in this action
1404  *    count.
1405  *
1406  *  Mac OS X threading:
1407  *    Not thread safe
1408  *
1409  *  Availability:
1410  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1411  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1412  *    Non-Carbon CFM:   not available
1413  }
1414 var kTXNActionCountOfTextChanges: CFStringRef; external name '_kTXNActionCountOfTextChanges'; (* attribute const *)
1415 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1416 
1417 {
1418  *  kTXNActionCountOfStyleChanges
1419  *
1420  *  Discussion:
1421  *    Any text style change are included in this action count.  Style
1422  *    changes include changing font/font face/font size/font
1423  *    feature/font variation/glyph variation/text position, and font
1424  *    color, etc. Undo or redo events of the kind listed above are also
1425  *    included in this action count.
1426  *
1427  *  Mac OS X threading:
1428  *    Not thread safe
1429  *
1430  *  Availability:
1431  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1432  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1433  *    Non-Carbon CFM:   not available
1434  }
1435 var kTXNActionCountOfStyleChanges: CFStringRef; external name '_kTXNActionCountOfStyleChanges'; (* attribute const *)
1436 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1437 
1438 {
1439  *  kTXNActionCountOfAllChanges
1440  *
1441  *  Discussion:
1442  *    A constant used to request the total count of actions including
1443  *    all text and style changes, as well as custom defined actions.
1444  *
1445  *  Mac OS X threading:
1446  *    Not thread safe
1447  *
1448  *  Availability:
1449  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1450  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1451  *    Non-Carbon CFM:   not available
1452  }
1453 var kTXNActionCountOfAllChanges: CFStringRef; external name '_kTXNActionCountOfAllChanges'; (* attribute const *)
1454 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1455 
1456 {������������������������������������������������������������������������������������������������������}
1457 {  � Scrolling                                                                                         }
1458 {������������������������������������������������������������������������������������������������������}
1459 
1460 {
1461  *  TXNScrollUnit
1462  *
1463  *  Discussion:
1464  *    Use as a parameter in TXNScroll.
1465  }
1466 type
1467 	TXNScrollUnit = UInt32;
1468 const
1469 	kTXNScrollUnitsInPixels = 0;
1470 	kTXNScrollUnitsInLines = 1;
1471 	kTXNScrollUnitsInViewRects = 2;
1472 
1473 
1474 {
1475  *  TXNScrollBarOrientation
1476  *
1477  *  Discussion:
1478  *    Use as a parameter in ScrollInfo callback.
1479  }
1480 type
1481 	TXNScrollBarOrientation = UInt32;
1482 const
1483 	kTXNHorizontal = 0;
1484 	kTXNVertical = 1;
1485 
1486 
1487 {
1488  *  TXNScrollBarState
1489  *
1490  *  Discussion:
1491  *    Use as a parameter in TXNActivate and TXNSetScrollbarState.
1492  }
1493 type
1494 	TXNScrollBarState = Boolean;
1495 const
1496 	kScrollBarsAlwaysActive = true;
1497 	kScrollBarsSyncWithFocus = false;
1498 
1499 {������������������������������������������������������������������������������������������������������}
1500 {  � Draw Item Bits                                                                                    }
1501 {������������������������������������������������������������������������������������������������������}
1502 {  Specifies which element(s) of the text object to render.   Useful in TXNDrawObject API.             }
1503 
1504 const
1505 	kTXNDrawItemScrollbarsBit = 0;
1506 	kTXNDrawItemTextBit = 1;
1507 	kTXNDrawItemTextAndSelectionBit = 2;
1508 
1509 type
1510 	TXNDrawItems = OptionBits;
1511 const
1512 	kTXNDrawItemScrollbarsMask = 1 shl kTXNDrawItemScrollbarsBit;
1513 	kTXNDrawItemTextMask = 1 shl kTXNDrawItemTextBit;
1514 	kTXNDrawItemTextAndSelectionMask = 1 shl kTXNDrawItemTextAndSelectionBit;
1515 	kTXNDrawItemAllMask = $FFFFFFFF;
1516 
1517 {������������������������������������������������������������������������������������������������������}
1518 {  � Rectangle Keys                                                                                    }
1519 {������������������������������������������������������������������������������������������������������}
1520 {  Each key corresponds to a specific bound for the object.  Useful in TXNGetHIRect API.               }
1521 
1522 type
1523 	TXNRectKey = UInt32;
1524 const
1525 	kTXNViewRectKey = 0;
1526 	kTXNDestinationRectKey = 1;
1527 	kTXNTextRectKey = 2;
1528 	kTXNVerticalScrollBarRectKey = 3;
1529 	kTXNHorizontalScrollBarRectKey = 4;
1530 
1531 {������������������������������������������������������������������������������������������������������}
1532 {  � Carbon Event Info                                                                                 }
1533 {������������������������������������������������������������������������������������������������������}
1534 
1535 { Dictionary keys currently supported in the TXNCarbonEventInfo dictionary }
1536 {$ifc USE_CFSTR_CONSTANT_MACROS}
1537 {$definec kTXNTextHandlerKey CFSTRP('TextInput')}
1538 {$endc}
1539 {$ifc USE_CFSTR_CONSTANT_MACROS}
1540 {$definec kTXNWindowEventHandlerKey CFSTRP('WindowEvent')}
1541 {$endc}
1542 {$ifc USE_CFSTR_CONSTANT_MACROS}
1543 {$definec kTXNWindowResizeEventHandlerKey CFSTRP('WindowResize')}
1544 {$endc}
1545 {$ifc USE_CFSTR_CONSTANT_MACROS}
1546 {$definec kTXNCommandTargetKey CFSTRP('CommandTarget')}
1547 {$endc}
1548 {$ifc USE_CFSTR_CONSTANT_MACROS}
1549 {$definec kTXNCommandUpdateKey CFSTRP('CommandUpdate')}
1550 {$endc}
1551 {$ifc USE_CFSTR_CONSTANT_MACROS}
1552 {$definec kTXNActionNameMapperKey CFSTRP('ActionNameMapper')}
1553 {$endc}
1554 {$ifc USE_CFSTR_CONSTANT_MACROS}
1555 {$definec kTXNWheelMouseEventHandlerKey CFSTRP('WheelMouseEvent')}
1556 {$endc}
1557 {$ifc USE_CFSTR_CONSTANT_MACROS}
1558 {$definec kTXNTSMDocumentAccessHandlerKey CFSTRP('TSMDocumentAccess')}
1559 {$endc}
1560 {$ifc USE_CFSTR_CONSTANT_MACROS}
1561 {$definec kTXNFontPanelEventHandlerKey CFSTRP('FontPanel')}
1562 {$endc}
1563 
1564 {
1565  *  TXNCarbonEventInfo
1566  *
1567  *  Summary:
1568  *    Used to pass an EventTargetRef to MLTE via
1569  *    TXNSetTXNObjectControls API.
1570  }
1571 type
1572 	TXNCarbonEventInfoPtr = ^TXNCarbonEventInfo;
1573 	TXNCarbonEventInfo = record
1574 {
1575    * Pass TRUE.  MLTE no longer uses AppleEvents.
1576    }
1577 		useCarbonEvents: Boolean;
1578 
1579   {
1580    * Pass NULL.
1581    }
1582 		filler: UInt8;
1583 
1584   {
1585    * Pass NULL.  AppleEvent flags have been deprecated.
1586    }
1587 		flags: UInt16;
1588 
1589   {
1590    * A reference to a Core Foundation dictionary whose keys are the
1591    * events you want handled and whose values are event target
1592    * references associated with the events. See the above list of
1593    * predefined keys you can use to build the dictionary.
1594    }
1595 		fDictionary: CFDictionaryRef;
1596 	end;
1597 
1598 
1599 {������������������������������������������������������������������������������������������������������------------}
1600 {  � Definition of dictionary keys for DocumentAttribute dictionary used in TXNWriteRangeToCFURL(), and            }
1601 {    and TXNReadFromCFURL().                                                                                       }
1602 {    When writing data out, document attributes are embedded into the data stream for document formats that        }
1603 {    support them (ie. MLTE native format and RTF); when reading data in document attributes are extracted         }
1604 {    from the data stream if the document format supports them.                                                    }
1605 {���������������������������������������������������������������������������������������������������------------���}
1606 
1607 {
1608  *  kTXNDocumentAttributeTitleKey
1609  *
1610  *  Discussion:
1611  *    CFString containing document title
1612  *
1613  *  Mac OS X threading:
1614  *    Not thread safe
1615  *
1616  *  Availability:
1617  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1618  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1619  *    Non-Carbon CFM:   not available
1620  }
1621 var kTXNDocumentAttributeTitleKey: CFStringRef; external name '_kTXNDocumentAttributeTitleKey'; (* attribute const *)
1622 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1623 
1624 {
1625  *  kTXNDocumentAttributeCompanyNameKey
1626  *
1627  *  Discussion:
1628  *    CFString containing company name
1629  *
1630  *  Mac OS X threading:
1631  *    Not thread safe
1632  *
1633  *  Availability:
1634  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1635  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1636  *    Non-Carbon CFM:   not available
1637  }
1638 var kTXNDocumentAttributeCompanyNameKey: CFStringRef; external name '_kTXNDocumentAttributeCompanyNameKey'; (* attribute const *)
1639 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1640 
1641 {
1642  *  kTXNDocumentAttributeSubjectKey
1643  *
1644  *  Discussion:
1645  *    CFString containing subject
1646  *
1647  *  Mac OS X threading:
1648  *    Not thread safe
1649  *
1650  *  Availability:
1651  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1652  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1653  *    Non-Carbon CFM:   not available
1654  }
1655 var kTXNDocumentAttributeSubjectKey: CFStringRef; external name '_kTXNDocumentAttributeSubjectKey'; (* attribute const *)
1656 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1657 
1658 {
1659  *  kTXNDocumentAttributeAuthorKey
1660  *
1661  *  Discussion:
1662  *    CFString containing author name (not necessarily same as "last
1663  *    editor," see editor key below)
1664  *
1665  *  Mac OS X threading:
1666  *    Not thread safe
1667  *
1668  *  Availability:
1669  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1670  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1671  *    Non-Carbon CFM:   not available
1672  }
1673 var kTXNDocumentAttributeAuthorKey: CFStringRef; external name '_kTXNDocumentAttributeAuthorKey'; (* attribute const *)
1674 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1675 
1676 {
1677  *  kTXNDocumentAttributeKeywordsKey
1678  *
1679  *  Discussion:
1680  *    CFArray of CFString, containing keywords
1681  *
1682  *  Mac OS X threading:
1683  *    Not thread safe
1684  *
1685  *  Availability:
1686  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1687  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1688  *    Non-Carbon CFM:   not available
1689  }
1690 var kTXNDocumentAttributeKeywordsKey: CFStringRef; external name '_kTXNDocumentAttributeKeywordsKey'; (* attribute const *)
1691 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1692 
1693 {
1694  *  kTXNDocumentAttributeCommentKey
1695  *
1696  *  Discussion:
1697  *    CFString containing comments
1698  *
1699  *  Mac OS X threading:
1700  *    Not thread safe
1701  *
1702  *  Availability:
1703  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1704  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1705  *    Non-Carbon CFM:   not available
1706  }
1707 var kTXNDocumentAttributeCommentKey: CFStringRef; external name '_kTXNDocumentAttributeCommentKey'; (* attribute const *)
1708 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1709 
1710 {
1711  *  kTXNDocumentAttributeEditorKey
1712  *
1713  *  Discussion:
1714  *    CFString containing name of person who last edited the document
1715  *
1716  *  Mac OS X threading:
1717  *    Not thread safe
1718  *
1719  *  Availability:
1720  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1721  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1722  *    Non-Carbon CFM:   not available
1723  }
1724 var kTXNDocumentAttributeEditorKey: CFStringRef; external name '_kTXNDocumentAttributeEditorKey'; (* attribute const *)
1725 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1726 
1727 {
1728  *  kTXNDocumentAttributeCreationTimeKey
1729  *
1730  *  Discussion:
1731  *    CFAbsoluteTime containing document comments; note that this is
1732  *    not the file system creation date of the file, but of the
1733  *    document, as it's stored in the document
1734  *
1735  *  Mac OS X threading:
1736  *    Not thread safe
1737  *
1738  *  Availability:
1739  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1740  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1741  *    Non-Carbon CFM:   not available
1742  }
1743 var kTXNDocumentAttributeCreationTimeKey: CFStringRef; external name '_kTXNDocumentAttributeCreationTimeKey'; (* attribute const *)
1744 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1745 
1746 {
1747  *  kTXNDocumentAttributeModificationTimeKey
1748  *
1749  *  Discussion:
1750  *    CFAbsoluteTime containing the last modification date of the
1751  *    document contents
1752  *
1753  *  Mac OS X threading:
1754  *    Not thread safe
1755  *
1756  *  Availability:
1757  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1758  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1759  *    Non-Carbon CFM:   not available
1760  }
1761 var kTXNDocumentAttributeModificationTimeKey: CFStringRef; external name '_kTXNDocumentAttributeModificationTimeKey'; (* attribute const *)
1762 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1763 {
1764  *  kTXNDocumentAttributeCopyrightKey
1765  *
1766  *  Discussion:
1767  *    CFString containing the copyright of the document
1768  *
1769  *  Mac OS X threading:
1770  *    Not thread safe
1771  *
1772  *  Availability:
1773  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1774  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1775  *    Non-Carbon CFM:   not available
1776  }
1777 var kTXNDocumentAttributeCopyrightKey: CFStringRef; external name '_kTXNDocumentAttributeCopyrightKey'; (* attribute const *)
1778 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1779 
1780 {������������������������������������������������������������������������������������������������������------------}
1781 {  � Key and value definitions for DataOption dictionary used in TXNWriteRangeToCFURL(), and TXNReadFromCFURL().   }
1782 {    Data options are used to specify options for reading in and writing out data.                                 }
1783 {���������������������������������������������������������������������������������������������������------------���}
1784 
1785 {
1786  *  kTXNDataOptionDocumentTypeKey
1787  *
1788  *  Discussion:
1789  *    CFString containing the document format. Supported string values:
1790  *    kTXNPlainTextDocumentType, kTXNMLTEDocumentType,
1791  *    kTXNRTFDocumentType, kTXNQuickTimeDocumentType
1792  *
1793  *  Mac OS X threading:
1794  *    Not thread safe
1795  *
1796  *  Availability:
1797  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1798  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1799  *    Non-Carbon CFM:   not available
1800  }
1801 var kTXNDataOptionDocumentTypeKey: CFStringRef; external name '_kTXNDataOptionDocumentTypeKey'; (* attribute const *)
1802 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1803 
1804 {
1805  *  kTXNDataOptionCharacterEncodingKey
1806  *
1807  *  Discussion:
1808  *    CFNumber of type kCFNumberSInt32Type containing the character
1809  *    encoding as specified in CFString.h and CFStringEncodingExt.h
1810  *
1811  *  Mac OS X threading:
1812  *    Not thread safe
1813  *
1814  *  Availability:
1815  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1816  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1817  *    Non-Carbon CFM:   not available
1818  }
1819 var kTXNDataOptionCharacterEncodingKey: CFStringRef; external name '_kTXNDataOptionCharacterEncodingKey'; (* attribute const *)
1820 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1821 
1822 { Document Type constants to be used as values for kTXNDataOptionDocumentTypeKey  }
1823 
1824 {
1825  *  kTXNPlainTextDocumentType
1826  *
1827  *  Discussion:
1828  *    Plain Text document
1829  *
1830  *  Mac OS X threading:
1831  *    Not thread safe
1832  *
1833  *  Availability:
1834  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1835  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1836  *    Non-Carbon CFM:   not available
1837  }
1838 var kTXNPlainTextDocumentType: CFStringRef; external name '_kTXNPlainTextDocumentType'; (* attribute const *)
1839 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1840 
1841 {
1842  *  kTXNMLTEDocumentType
1843  *
1844  *  Discussion:
1845  *    MLTE native document
1846  *
1847  *  Mac OS X threading:
1848  *    Not thread safe
1849  *
1850  *  Availability:
1851  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1852  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1853  *    Non-Carbon CFM:   not available
1854  }
1855 var kTXNMLTEDocumentType: CFStringRef; external name '_kTXNMLTEDocumentType'; (* attribute const *)
1856 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1857 
1858 {
1859  *  kTXNRTFDocumentType
1860  *
1861  *  Discussion:
1862  *    RTF document
1863  *
1864  *  Mac OS X threading:
1865  *    Not thread safe
1866  *
1867  *  Availability:
1868  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1869  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1870  *    Non-Carbon CFM:   not available
1871  }
1872 var kTXNRTFDocumentType: CFStringRef; external name '_kTXNRTFDocumentType'; (* attribute const *)
1873 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1874 {
1875  *  kTXNQuickTimeDocumentType
1876  *
1877  *  Discussion:
1878  *    Multimedia file that can be opened by QuickTime
1879  *    importers
1880  *    <BR>NOTE:Only supported for reading data, not writing.
1881  *
1882  *  Mac OS X threading:
1883  *    Not thread safe
1884  *
1885  *  Availability:
1886  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
1887  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1888  *    Non-Carbon CFM:   not available
1889  }
1890 var kTXNQuickTimeDocumentType: CFStringRef; external name '_kTXNQuickTimeDocumentType'; (* attribute const *)
1891 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1892 {������������������������������������������������������������������������������������������������������}
1893 {  � Callbacks                                                                                         }
1894 {������������������������������������������������������������������������������������������������������}
1895 
1896 type
constnull1897 	TXNFindProcPtr = function( const (*var*) matchData: TXNMatchTextRecord; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iSearchTextPtr: {const} UnivPtr; encoding: TextEncoding; absStartOffset: TXNOffset; searchTextLength: ByteCount; var oStartMatch: TXNOffset; var oEndMatch: TXNOffset; var ofound: Boolean; refCon: URefCon ): OSStatus;
actionNamenull1898 	TXNActionNameMapperProcPtr = function( actionName: CFStringRef; commandID: UInt32; inUserData: UnivPtr ): CFStringRef;
1899 	TXNContextualMenuSetupProcPtr = procedure( iContextualMenu: MenuRef; objct: TXNObject; inUserData: UnivPtr );
1900 	TXNScrollInfoProcPtr = procedure( iValue: SInt32; iMaximumValue: SInt32; iScrollBarOrientation: TXNScrollBarOrientation; iRefCon: SRefCon );
1901 type
1902 	TXNFindUPP = TXNFindProcPtr;
1903 type
1904 	TXNActionNameMapperUPP = TXNActionNameMapperProcPtr;
1905 type
1906 	TXNContextualMenuSetupUPP = TXNContextualMenuSetupProcPtr;
1907 type
1908 	TXNScrollInfoUPP = TXNScrollInfoProcPtr;
1909 {
1910  *  NewTXNFindUPP()
1911  *
1912  *  Availability:
1913  *    Mac OS X:         in version 10.0 and later in Carbon.framework
1914  *    CarbonLib:        in CarbonLib 1.0 and later
1915  *    Non-Carbon CFM:   available as macro/inline
1916  }
NewTXNFindUPPnull1917 function NewTXNFindUPP( userRoutine: TXNFindProcPtr ): TXNFindUPP; external name '_NewTXNFindUPP';
1918 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1919 
1920 {
1921  *  NewTXNActionNameMapperUPP()
1922  *
1923  *  Availability:
1924  *    Mac OS X:         in version 10.4 and later in Carbon.framework
1925  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1926  *    Non-Carbon CFM:   available as macro/inline
1927  }
NewTXNActionNameMapperUPPnull1928 function NewTXNActionNameMapperUPP( userRoutine: TXNActionNameMapperProcPtr ): TXNActionNameMapperUPP; external name '_NewTXNActionNameMapperUPP';
1929 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1930 
1931 {
1932  *  NewTXNContextualMenuSetupUPP()
1933  *
1934  *  Availability:
1935  *    Mac OS X:         in version 10.4 and later in Carbon.framework
1936  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1937  *    Non-Carbon CFM:   available as macro/inline
1938  }
NewTXNContextualMenuSetupUPPnull1939 function NewTXNContextualMenuSetupUPP( userRoutine: TXNContextualMenuSetupProcPtr ): TXNContextualMenuSetupUPP; external name '_NewTXNContextualMenuSetupUPP';
1940 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1941 
1942 {
1943  *  NewTXNScrollInfoUPP()
1944  *
1945  *  Availability:
1946  *    Mac OS X:         in version 10.1 and later in Carbon.framework
1947  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1948  *    Non-Carbon CFM:   available as macro/inline
1949  }
NewTXNScrollInfoUPPnull1950 function NewTXNScrollInfoUPP( userRoutine: TXNScrollInfoProcPtr ): TXNScrollInfoUPP; external name '_NewTXNScrollInfoUPP';
1951 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
1952 
1953 {
1954  *  DisposeTXNFindUPP()
1955  *
1956  *  Availability:
1957  *    Mac OS X:         in version 10.0 and later in Carbon.framework
1958  *    CarbonLib:        in CarbonLib 1.0 and later
1959  *    Non-Carbon CFM:   available as macro/inline
1960  }
1961 procedure DisposeTXNFindUPP( userUPP: TXNFindUPP ); external name '_DisposeTXNFindUPP';
1962 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
1963 
1964 {
1965  *  DisposeTXNActionNameMapperUPP()
1966  *
1967  *  Availability:
1968  *    Mac OS X:         in version 10.4 and later in Carbon.framework
1969  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1970  *    Non-Carbon CFM:   available as macro/inline
1971  }
1972 procedure DisposeTXNActionNameMapperUPP( userUPP: TXNActionNameMapperUPP ); external name '_DisposeTXNActionNameMapperUPP';
1973 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1974 
1975 {
1976  *  DisposeTXNContextualMenuSetupUPP()
1977  *
1978  *  Availability:
1979  *    Mac OS X:         in version 10.4 and later in Carbon.framework
1980  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
1981  *    Non-Carbon CFM:   available as macro/inline
1982  }
1983 procedure DisposeTXNContextualMenuSetupUPP( userUPP: TXNContextualMenuSetupUPP ); external name '_DisposeTXNContextualMenuSetupUPP';
1984 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
1985 
1986 {
1987  *  DisposeTXNScrollInfoUPP()
1988  *
1989  *  Availability:
1990  *    Mac OS X:         in version 10.1 and later in Carbon.framework
1991  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
1992  *    Non-Carbon CFM:   available as macro/inline
1993  }
1994 procedure DisposeTXNScrollInfoUPP( userUPP: TXNScrollInfoUPP ); external name '_DisposeTXNScrollInfoUPP';
1995 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
1996 
1997 {
1998  *  InvokeTXNFindUPP()
1999  *
2000  *  Availability:
2001  *    Mac OS X:         in version 10.0 and later in Carbon.framework
2002  *    CarbonLib:        in CarbonLib 1.0 and later
2003  *    Non-Carbon CFM:   available as macro/inline
2004  }
InvokeTXNFindUPPnull2005 function InvokeTXNFindUPP( const (*var*) matchData: TXNMatchTextRecord; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iSearchTextPtr: {const} UnivPtr; encoding: TextEncoding; absStartOffset: TXNOffset; searchTextLength: ByteCount; var oStartMatch: TXNOffset; var oEndMatch: TXNOffset; var ofound: Boolean; refCon: URefCon; userUPP: TXNFindUPP ): OSStatus; external name '_InvokeTXNFindUPP';
2006 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2007 
2008 {
2009  *  InvokeTXNActionNameMapperUPP()
2010  *
2011  *  Availability:
2012  *    Mac OS X:         in version 10.4 and later in Carbon.framework
2013  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2014  *    Non-Carbon CFM:   available as macro/inline
2015  }
InvokeTXNActionNameMapperUPPnull2016 function InvokeTXNActionNameMapperUPP( actionName: CFStringRef; commandID: UInt32; inUserData: UnivPtr; userUPP: TXNActionNameMapperUPP ): CFStringRef; external name '_InvokeTXNActionNameMapperUPP';
2017 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2018 
2019 {
2020  *  InvokeTXNContextualMenuSetupUPP()
2021  *
2022  *  Availability:
2023  *    Mac OS X:         in version 10.4 and later in Carbon.framework
2024  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2025  *    Non-Carbon CFM:   available as macro/inline
2026  }
2027 procedure InvokeTXNContextualMenuSetupUPP( iContextualMenu: MenuRef; objct: TXNObject; inUserData: UnivPtr; userUPP: TXNContextualMenuSetupUPP ); external name '_InvokeTXNContextualMenuSetupUPP';
2028 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2029 
2030 {
2031  *  InvokeTXNScrollInfoUPP()
2032  *
2033  *  Availability:
2034  *    Mac OS X:         in version 10.1 and later in Carbon.framework
2035  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.1 and later
2036  *    Non-Carbon CFM:   available as macro/inline
2037  }
2038 procedure InvokeTXNScrollInfoUPP( iValue: SInt32; iMaximumValue: SInt32; iScrollBarOrientation: TXNScrollBarOrientation; iRefCon: SRefCon; userUPP: TXNScrollInfoUPP ); external name '_InvokeTXNScrollInfoUPP';
2039 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
2040 
2041 
2042 { **************************************************************************************************** }
2043 {������������������������������������������������������������������������������������������������������}
2044 {                                  �  MLTE APIs �                                                      }
2045 {������������������������������������������������������������������������������������������������������}
2046 { **************************************************************************************************** }
2047 
2048 {������������������������������������������������������������������������������������������������������}
2049 {  � Creating and Destroying Object                                                                    }
2050 {������������������������������������������������������������������������������������������������������}
2051 
2052 {$ifc not TARGET_CPU_64}
2053 {
2054  *  TXNCreateObject()
2055  *
2056  *  Summary:
2057  *    Creates a new text object of type TXNObject, which is an opaque
2058  *    structure that handles text formatting.
2059  *
2060  *  Mac OS X threading:
2061  *    Not thread safe
2062  *
2063  *  Parameters:
2064  *
2065  *    iFrameRect:
2066  *      A pointer to a variable of type HIRect. The rectangle is used
2067  *      to specify the destination and view rectangles for the new MLTE
2068  *      object. A value of NULL indicates that the rectangle for the
2069  *      window port will be used as view and destination rectangles
2070  *      when the object is attached later on to the window. See
2071  *      TXNAttachObjectToWindowRef below.
2072  *
2073  *    iFrameOptions:
2074  *      A value of type TXNFrameOptions that specifies the options you
2075  *      want the object to support. �See Frame Options� in the MLTE
2076  *      Reference for a description of the options.
2077  *
2078  *    oTXNObject:
2079  *      A pointer to a structure of type TXNObject. On return, this
2080  *      points to the opaque text object data structure allocated by
2081  *      the function. You need to pass this object to most MLTE
2082  *      functions.
2083  *
2084  *  Result:
2085  *    A result code indicating success or failure.
2086  *
2087  *  Availability:
2088  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
2089  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2090  *    Non-Carbon CFM:   not available
2091  }
TXNCreateObjectnull2092 function TXNCreateObject( const (*var*) iFrameRect: HIRect; iFrameOptions: TXNFrameOptions; var oTXNObject: TXNObject ): OSStatus; external name '_TXNCreateObject';
2093 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2094 
2095 
2096 {
2097  *  TXNDeleteObject()
2098  *
2099  *  Summary:
2100  *    Delete a previously allocated TXNObject and all associated data
2101  *    structures. If the frameType is multiple frames all frames are
2102  *    released.
2103  *
2104  *  Mac OS X threading:
2105  *    Not thread safe
2106  *
2107  *  Parameters:
2108  *
2109  *    iTXNObject:
2110  *      Opaque TXNObject obtained from TXNCreateObject.  The text
2111  *      object to free.
2112  *
2113  *  Availability:
2114  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2115  *    CarbonLib:        in CarbonLib 1.0 and later
2116  *    Non-Carbon CFM:   in Textension 1.0 and later
2117  }
2118 procedure TXNDeleteObject( iTXNObject: TXNObject ); external name '_TXNDeleteObject';
2119 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2120 
2121 
2122 {
2123  *  TXNInitTextension()
2124  *
2125  *  Summary:
2126  *    Initialize the Textension library.  Should be called as soon as
2127  *    possible after the Macintosh toolbox is initialized.  On Mac OS X
2128  *    version 10.3 or later, it's not necessary to call this routine.
2129  *    The cases where you may want to call this routine are: 1) A set
2130  *    of default fonts different from the system default is desired. 2)
2131  *    Want to have multimedia support 3) Want to use QuickdrawText
2132  *    instead of ATSUI to render the text.
2133  *
2134  *  Mac OS X threading:
2135  *    Not thread safe
2136  *
2137  *  Parameters:
2138  *
2139  *    iDefaultFonts:
2140  *      A table of font information including fontFamily ID, point
2141  *      size, style, and script code. The table can be NULL or can have
2142  *      an entry for any script for which you would like to to
2143  *      designate a default font.  Only a valid script number is
2144  *      required.  You can designate that Textension should use the
2145  *      default for a give script by setting the field to
2146  *      kTXNUseScriptDefaultValue (-1).
2147  *
2148  *    iCountDefaultFonts:
2149  *      Count of entries in the iDefaultFonts parameter.
2150  *
2151  *    iUsageFlags:
2152  *      Specify whether multimeida should be supported.
2153  *
2154  *  Result:
2155  *    A result code indicating success or failure. Various MacOS errors
2156  *    are possible if something is wrong.
2157  *
2158  *  Availability:
2159  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2160  *    CarbonLib:        in CarbonLib 1.0 and later
2161  *    Non-Carbon CFM:   in Textension 1.0 and later
2162  }
TXNInitTextensionnull2163 function TXNInitTextension( {const} iDefaultFonts: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr { can be NULL }; iCountDefaultFonts: ItemCount; iUsageFlags: TXNInitOptions ): OSStatus; external name '_TXNInitTextension';
2164 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2165 
2166 
2167 {
2168  *  TXNVersionInformation()
2169  *
2170  *  Summary:
2171  *    Get the version number and a set of feature bits.
2172  *    TXNVersionValue uses a NumVersion structure. See MacTypes.h for
2173  *    the format of the version.  Currently there are two feature bits:
2174  *     one for ATSUI default, another one for CarbonEvent default.
2175  *
2176  *  Mac OS X threading:
2177  *    Not thread safe
2178  *
2179  *  Parameters:
2180  *
2181  *    oFeatureFlags:
2182  *      Pointer to a bit mask.  See TXNFeatureMask enum above. If
2183  *      kTXNWillDefaultToATSUIBit is set it means that by default MLTE
2184  *      will use ATSUI to image and measure text and will default to
2185  *      using Unicode to store characters.
2186  *
2187  *  Result:
2188  *    TXNVersionValue: Current version.
2189  *
2190  *  Availability:
2191  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2192  *    CarbonLib:        in CarbonLib 1.0 and later
2193  *    Non-Carbon CFM:   in Textension 1.0 and later
2194  }
TXNVersionInformationnull2195 function TXNVersionInformation( var oFeatureFlags: TXNFeatureBits ): TXNVersionValue; external name '_TXNVersionInformation';
2196 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2197 
2198 
2199 {������������������������������������������������������������������������������������������������������}
2200 {  � Set/Get Window Associated with the Object                                                         }
2201 {������������������������������������������������������������������������������������������������������}
2202 {
2203  *  TXNAttachObjectToWindowRef()
2204  *
2205  *  Summary:
2206  *    Attaches a text object to a window.
2207  *
2208  *  Mac OS X threading:
2209  *    Not thread safe
2210  *
2211  *  Parameters:
2212  *
2213  *    iTXNObject:
2214  *      Opaque TXNObject obtained from TXNCreateObject.  The text
2215  *      object you want to attach to the input window.
2216  *
2217  *    iWindowRef:
2218  *      A WindowRef for the window you want to attach the object to.
2219  *
2220  *  Result:
2221  *    A result code indicating success or failure.
2222  *
2223  *  Availability:
2224  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
2225  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2226  *    Non-Carbon CFM:   not available
2227  }
TXNAttachObjectToWindowRefnull2228 function TXNAttachObjectToWindowRef( iTXNObject: TXNObject; iWindowRef: WindowRef ): OSStatus; external name '_TXNAttachObjectToWindowRef';
2229 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2230 
2231 
2232 {
2233  *  TXNGetWindowRef()
2234  *
2235  *  Summary:
2236  *    Returns the window that the input object is attached to.
2237  *
2238  *  Discussion:
2239  *    If no window is attached to the object it returns NULL.
2240  *
2241  *  Mac OS X threading:
2242  *    Not thread safe
2243  *
2244  *  Parameters:
2245  *
2246  *    iTXNObject:
2247  *      Opaque TXNObject obtained from TXNCreateObject.  The text
2248  *      object you want to attach to the input window.
2249  *
2250  *  Result:
2251  *    The windowRef for the current window attached to the the text
2252  *    object.
2253  *
2254  *  Availability:
2255  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
2256  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2257  *    Non-Carbon CFM:   not available
2258  }
TXNGetWindowRefnull2259 function TXNGetWindowRef( iTXNObject: TXNObject ): WindowRef; external name '_TXNGetWindowRef';
2260 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2261 
2262 
2263 {������������������������������������������������������������������������������������������������������}
2264 {  � Events                                                                                            }
2265 {������������������������������������������������������������������������������������������������������}
2266 
2267 {
2268  *  TXNKeyDown()
2269  *
2270  *  Summary:
2271  *    Process a keydown event. Note that if CJK script is installed and
2272  *    current font is CJK inline input will take place. This is always
2273  *    the case unless the application has requested the bottomline
2274  *    window or has turned off TSM (see initialization options above).
2275  *
2276  *  Mac OS X threading:
2277  *    Not thread safe
2278  *
2279  *  Parameters:
2280  *
2281  *    iTXNObject:
2282  *      Opaque struct to apply keydown to.
2283  *
2284  *    iEvent:
2285  *      The keydown event.
2286  *
2287  *  Availability:
2288  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2289  *    CarbonLib:        in CarbonLib 1.0 and later
2290  *    Non-Carbon CFM:   in Textension 1.0 and later
2291  }
2292 procedure TXNKeyDown( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNKeyDown';
2293 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2294 
2295 
2296 {
2297  *  TXNAdjustCursor()
2298  *
2299  *  Summary:
2300  *    Handle switching the cursor.  If over text area set to i-beam.
2301  *    Over graphics, sound, movie, scrollbar or outside of window set
2302  *    to arrow.
2303  *
2304  *  Mac OS X threading:
2305  *    Not thread safe
2306  *
2307  *  Parameters:
2308  *
2309  *    iTXNObject:
2310  *      Opaque struct obtained from TXNCreateObject.
2311  *
2312  *    ioCursorRgn:
2313  *      Region to be passed to WaitNextEvent.  Resized accordingly by
2314  *      TXNAdjustCursor.
2315  *
2316  *  Availability:
2317  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2318  *    CarbonLib:        in CarbonLib 1.0 and later
2319  *    Non-Carbon CFM:   in Textension 1.0 and later
2320  }
2321 procedure TXNAdjustCursor( iTXNObject: TXNObject; ioCursorRgn: RgnHandle ); external name '_TXNAdjustCursor';
2322 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2323 
2324 
2325 {
2326  *  TXNClick()
2327  *
2328  *  Summary:
2329  *    Process click in content region.  Takes care of scrolling,
2330  *    selecting text,  playing sound and movies, drag & drop, and
2331  *    double-clicks.
2332  *
2333  *  Mac OS X threading:
2334  *    Not thread safe
2335  *
2336  *  Parameters:
2337  *
2338  *    iTXNObject:
2339  *      Opaque struct obtained from TXNCreateObject.
2340  *
2341  *    iEvent:
2342  *      The mousedown event.
2343  *
2344  *  Availability:
2345  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2346  *    CarbonLib:        in CarbonLib 1.0 and later
2347  *    Non-Carbon CFM:   in Textension 1.0 and later
2348  }
2349 procedure TXNClick( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNClick';
2350 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2351 
2352 
2353 {
2354  *  TXNSelectAll()
2355  *
2356  *  Summary:
2357  *    Selects everything in a frame.
2358  *
2359  *  Mac OS X threading:
2360  *    Not thread safe
2361  *
2362  *  Parameters:
2363  *
2364  *    iTXNObject:
2365  *      Opaque struct obtained from TXNCreateObject.
2366  *
2367  *  Availability:
2368  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2369  *    CarbonLib:        in CarbonLib 1.0 and later
2370  *    Non-Carbon CFM:   in Textension 1.0 and later
2371  }
2372 procedure TXNSelectAll( iTXNObject: TXNObject ); external name '_TXNSelectAll';
2373 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2374 
2375 
2376 {
2377  *  TXNFocus()
2378  *
2379  *  Summary:
2380  *    Focus the TXNObject.  Scrollbars and insertion point are made
2381  *    active  if iBecomingFocused is true, and inactive if false.
2382  *
2383  *  Mac OS X threading:
2384  *    Not thread safe
2385  *
2386  *  Parameters:
2387  *
2388  *    iTXNObject:
2389  *      Opaque struct obtained from TXNCreateObject.
2390  *
2391  *    iBecomingFocused:
2392  *      true if becoming active.  false otherwise.
2393  *
2394  *  Availability:
2395  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2396  *    CarbonLib:        in CarbonLib 1.0 and later
2397  *    Non-Carbon CFM:   in Textension 1.0 and later
2398  }
2399 procedure TXNFocus( iTXNObject: TXNObject; iBecomingFocused: Boolean ); external name '_TXNFocus';
2400 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2401 
2402 
2403 {
2404  *  TXNUpdate()
2405  *
2406  *  Summary:
2407  *    Handle update event (i.e. draw everything in a frame.) This
2408  *    function calls the Toolbox BeginUpdate - EndUpdate functions for
2409  *    the window that was passed to TXNCreateObject.  This makes it
2410  *    inappropriate for windows that contain something else besides the
2411  *    TXNObject.
2412  *
2413  *  Mac OS X threading:
2414  *    Not thread safe
2415  *
2416  *  Parameters:
2417  *
2418  *    iTXNObject:
2419  *      Opaque struct obtained from TXNCreateObject.
2420  *
2421  *  Availability:
2422  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2423  *    CarbonLib:        in CarbonLib 1.0 and later
2424  *    Non-Carbon CFM:   in Textension 1.0 and later
2425  }
2426 procedure TXNUpdate( iTXNObject: TXNObject ); external name '_TXNUpdate';
2427 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2428 
2429 
2430 {
2431  *  TXNDrawObject()
2432  *
2433  *  Summary:
2434  *    Renders the current content of the TXNObject on the screen.
2435  *
2436  *  Discussion:
2437  *    Redraws the object element(s) specified in the TXNDrawItems
2438  *    flags.  Drawing is limited to the input clip rectangle.
2439  *
2440  *  Mac OS X threading:
2441  *    Not thread safe
2442  *
2443  *  Parameters:
2444  *
2445  *    iTXNObject:
2446  *      Opaque TXNObject obtained from TXNCreateObject. Draw into this
2447  *      text object.
2448  *
2449  *    iClipRect:
2450  *      A pointer to a HIRect. If the rectangle is NULL, MLTE uses its
2451  *      view rectangle when drawing. If the rectangle is not NULL, MLTE
2452  *      will intersect iClipRect with the view rectangle to determine
2453  *      the rectangle to draw.  MLTE will not draw in area not covered
2454  *      by the port's clip region.  Therefore, a given clipRect larger
2455  *      than the port's clip region will be trimmed down.
2456  *
2457  *    iDrawItems:
2458  *      A value of type TXNDrawItems. Indicates what element(s) of the
2459  *      object are to be drawn.
2460  *
2461  *  Result:
2462  *    A result code indicating success or failure.
2463  *
2464  *  Availability:
2465  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
2466  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
2467  *    Non-Carbon CFM:   not available
2468  }
TXNDrawObjectnull2469 function TXNDrawObject( iTXNObject: TXNObject; const (*var*) iClipRect: HIRect; iDrawItems: TXNDrawItems ): OSStatus; external name '_TXNDrawObject';
2470 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
2471 
2472 
2473 {
2474  *  TXNForceUpdate()
2475  *
2476  *  Summary:
2477  *    Force a frame to be updated.  Very much like toolbox call
2478  *    InvalRect.
2479  *
2480  *  Mac OS X threading:
2481  *    Not thread safe
2482  *
2483  *  Parameters:
2484  *
2485  *    iTXNObject:
2486  *      Opaque TXNObject obtained from TXNCreateObject.
2487  *
2488  *  Availability:
2489  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2490  *    CarbonLib:        in CarbonLib 1.0 and later
2491  *    Non-Carbon CFM:   in Textension 1.0 and later
2492  }
2493 procedure TXNForceUpdate( iTXNObject: TXNObject ); external name '_TXNForceUpdate';
2494 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2495 
2496 
2497 {
2498  *  TXNGetSleepTicks()
2499  *
2500  *  Summary:
2501  *    Depending on state of window get the appropriate sleep time to be
2502  *    passed to WaitNextEvent.
2503  *
2504  *  Mac OS X threading:
2505  *    Not thread safe
2506  *
2507  *  Parameters:
2508  *
2509  *    iTXNObject:
2510  *      Opaque TXNObject obtained from TXNCreateObject.
2511  *
2512  *  Result:
2513  *    A UInt32 value of the appropriate sleep time.
2514  *
2515  *  Availability:
2516  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2517  *    CarbonLib:        in CarbonLib 1.0 and later
2518  *    Non-Carbon CFM:   in Textension 1.0 and later
2519  }
TXNGetSleepTicksnull2520 function TXNGetSleepTicks( iTXNObject: TXNObject ): UInt32; external name '_TXNGetSleepTicks';
2521 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2522 
2523 
2524 {
2525  *  TXNIdle()
2526  *
2527  *  Summary:
2528  *    Do necessary Idle time processing. Typically flash the cursor. If
2529  *    a TextService is active pass a NULL event to the Text Service so
2530  *    it gets  time.
2531  *
2532  *  Mac OS X threading:
2533  *    Not thread safe
2534  *
2535  *  Parameters:
2536  *
2537  *    iTXNObject:
2538  *      Opaque TXNObject obtained from TXNCreateObject.
2539  *
2540  *  Availability:
2541  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2542  *    CarbonLib:        in CarbonLib 1.0 and later
2543  *    Non-Carbon CFM:   in Textension 1.0 and later
2544  }
2545 procedure TXNIdle( iTXNObject: TXNObject ); external name '_TXNIdle';
2546 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2547 
2548 
2549 {
2550  *  TXNGrowWindow()
2551  *
2552  *  Summary:
2553  *    Handle mouse-down in grow region.
2554  *
2555  *  Mac OS X threading:
2556  *    Not thread safe
2557  *
2558  *  Parameters:
2559  *
2560  *    iTXNObject:
2561  *      Opaque TXNObject obtained from TXNCreateObject.
2562  *
2563  *    iEvent:
2564  *      The mousedown event
2565  *
2566  *  Availability:
2567  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2568  *    CarbonLib:        in CarbonLib 1.0 and later
2569  *    Non-Carbon CFM:   in Textension 1.0 and later
2570  }
2571 procedure TXNGrowWindow( iTXNObject: TXNObject; const (*var*) iEvent: EventRecord ); external name '_TXNGrowWindow';
2572 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2573 
2574 
2575 {
2576  *  TXNZoomWindow()
2577  *
2578  *  Summary:
2579  *    Handle mouse-down in zoom.
2580  *
2581  *  Mac OS X threading:
2582  *    Not thread safe
2583  *
2584  *  Parameters:
2585  *
2586  *    iTXNObject:
2587  *      Opaque TXNObject obtained from TXNCreateObject.
2588  *
2589  *    iPart:
2590  *      Value returned by FindWindow
2591  *
2592  *  Availability:
2593  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2594  *    CarbonLib:        in CarbonLib 1.0 and later
2595  *    Non-Carbon CFM:   in Textension 1.0 and later
2596  }
2597 procedure TXNZoomWindow( iTXNObject: TXNObject; iPart: SInt16 ); external name '_TXNZoomWindow';
2598 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2599 
2600 
2601 {������������������������������������������������������������������������������������������������������}
2602 {  � Redo/Undo                                                                                         }
2603 {������������������������������������������������������������������������������������������������������}
2604 
2605 {
2606  *  TXNBeginActionGroup()
2607  *
2608  *  Summary:
2609  *    Starts an action group. Every supported edit action after
2610  *    TXNBeginActionGroup is called is added to the group until
2611  *    TXNEndActionGroup (see below) is called. When MLTE receives an
2612  *    undo/redo command, it will treat all actions added to the group
2613  *    as a single operation to undo/redo. Nesting of groups is not
2614  *    allowed. Calling TXNBeginActionGroup twice without calling
2615  *    TXNEndActionGroup in between will result in an error.
2616  *    TXNCanUndoAction and TXNCanRedoAction return false if there is an
2617  *    active action group.
2618  *
2619  *  Mac OS X threading:
2620  *    Not thread safe
2621  *
2622  *  Parameters:
2623  *
2624  *    iTXNObject:
2625  *      Opaque TXNObject obtained from TXNCreateObject.
2626  *
2627  *    iActionGroupName:
2628  *      A client supplied string used to describe the action group.
2629  *
2630  *  Result:
2631  *    An operating system status code. The error
2632  *    kTXNOperationNotAllowedErr is returned if an undo action group
2633  *    has already been started but not terminated.
2634  *
2635  *  Availability:
2636  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
2637  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2638  *    Non-Carbon CFM:   not available
2639  }
TXNBeginActionGroupnull2640 function TXNBeginActionGroup( iTXNObject: TXNObject; iActionGroupName: CFStringRef ): OSStatus; external name '_TXNBeginActionGroup';
2641 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2642 
2643 
2644 {
2645  *  TXNEndActionGroup()
2646  *
2647  *  Summary:
2648  *    Ends the current action group. The call is ignored is there is no
2649  *    active action group.
2650  *
2651  *  Mac OS X threading:
2652  *    Not thread safe
2653  *
2654  *  Parameters:
2655  *
2656  *    iTXNObject:
2657  *      Opaque TXNObject obtained from TXNCreateObject.
2658  *
2659  *  Result:
2660  *    An operating system status code.
2661  *
2662  *  Availability:
2663  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
2664  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2665  *    Non-Carbon CFM:   not available
2666  }
TXNEndActionGroupnull2667 function TXNEndActionGroup( iTXNObject: TXNObject ): OSStatus; external name '_TXNEndActionGroup';
2668 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2669 
2670 
2671 {
2672  *  TXNCanUndoAction()
2673  *
2674  *  Summary:
2675  *    Tells the client whether the last action is undoable or not, and
2676  *    if requested it returns a string that identifies the last action.
2677  *    Usually, this function is used by clients to determine whether
2678  *    the Undo item in the Edit menu should be enabled or not, and to
2679  *    obtain the action name that should be used in that item. When the
2680  *    last action is an action group (See
2681  *    TXNBeginActionGroup/TXNEndActionGroup), the the string used to
2682  *    name the group is returned. If you have asked MLTE to handling
2683  *    updating for the Redo and Undo edit commands you should call
2684  *    TXNSetActionNameMapper after calling TXNCanUndoAction so that
2685  *    MLTE can callback to you to get the correct strings for those
2686  *    items.
2687  *
2688  *  Mac OS X threading:
2689  *    Not thread safe
2690  *
2691  *  Parameters:
2692  *
2693  *    iTXNObject:
2694  *      Opaque TXNObject obtained from TXNCreateObject.
2695  *
2696  *    oActionName:
2697  *      Pointer to the string that denotes the last action. Pass in
2698  *      NULL if the string is not needed. The returned string is either
2699  *      a string defined by MLTE, or a string passed by the client to
2700  *      the TXNBeginActionGroup when a new action group is created. The
2701  *      client is responsible to retain and release the string.
2702  *
2703  *  Result:
2704  *    Returns a Boolean value. If true, the last action is undoable,
2705  *    and the Undo item in the Edit menu, if there is one, should be
2706  *    enabled. If false, the last action cannot be undone and Undo item
2707  *    in the Edit menu should be grayed out.
2708  *
2709  *  Availability:
2710  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
2711  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2712  *    Non-Carbon CFM:   not available
2713  }
TXNCanUndoActionnull2714 function TXNCanUndoAction( iTXNObject: TXNObject; var oActionName: CFStringRef ): Boolean; external name '_TXNCanUndoAction';
2715 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2716 
2717 
2718 {
2719  *  TXNCanRedoAction()
2720  *
2721  *  Summary:
2722  *    Tells the client whether the current item on the undo stack is
2723  *    redoable or not. Usually, this function is used by clients to
2724  *    determine whether the Redo item in the Edit menu should be
2725  *    enabled or not, and to obtain the action name that should be used
2726  *    in that item. When the current undo item is an action group (See
2727  *    TXNBeginActionGroup/TXNEndActionGroup), the string used to name
2728  *    the group is returned.
2729  *
2730  *  Mac OS X threading:
2731  *    Not thread safe
2732  *
2733  *  Parameters:
2734  *
2735  *    iTXNObject:
2736  *      Opaque TXNObject obtained from TXNCreateObject.
2737  *
2738  *    oActionName:
2739  *      Pointer to the string that denotes the current item in the undo
2740  *      stack. Pass in NULL if the string is not needed. The returned
2741  *      string is either a string defined by MLTE, or the string passed
2742  *      by the client to TXNBeginActionGroup when a new action group is
2743  *      created. The client is responsible to retain and release the
2744  *      string.
2745  *
2746  *  Result:
2747  *    Returns a Boolean value. If true, the last action is redoable,
2748  *    and the Redo item in the Edit menu, if there is one, should be
2749  *    enabled. If false, the last action cannot be redone, and the Redo
2750  *    item in the Edit menu should be grayed out.
2751  *
2752  *  Availability:
2753  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
2754  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2755  *    Non-Carbon CFM:   not available
2756  }
TXNCanRedoActionnull2757 function TXNCanRedoAction( iTXNObject: TXNObject; var oActionName: CFStringRef ): Boolean; external name '_TXNCanRedoAction';
2758 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2759 
2760 
2761 {
2762  *  TXNSetActionNameMapper()
2763  *
2764  *  Summary:
2765  *    Provides MLTE with a callback that is used to obtain the
2766  *    appropriate localized string, which represent either a single
2767  *    action or an action group (See
2768  *    TXNBeginActionGroup/TXNEndActionGroup), for updating the Redo and
2769  *    Undo items in the Edit menu.
2770  *
2771  *  Discussion:
2772  *    If you have asked MLTE to handling updating for the Redo and Undo
2773  *    edit commands you should call this function so that MLTE can
2774  *    callback to you to get the correct strings for those items. When
2775  *    MLTE's handler for kEventClassCommand/kEventCommandUpdateStatus
2776  *    is called for the Redo or Undo command MLTE will check to see if
2777  *    a TXNActionNameMapperProc has been installed. If it has the is
2778  *    called to get the correct string to update the menu item.  The
2779  *    client can used the action name and the command ID to determine
2780  *    the appropriate string.
2781  *
2782  *  Mac OS X threading:
2783  *    Not thread safe
2784  *
2785  *  Parameters:
2786  *
2787  *    iTXNObject:
2788  *      The TXNObject.
2789  *
2790  *    iStringForKeyProc:
2791  *      The callback.
2792  *
2793  *    iUserData:
2794  *      A pointer to anything.  Of course its a good idea to point at
2795  *      something that will help you map the action key to a string.
2796  *
2797  *  Result:
2798  *    OSStatus.  noErr if the operation is successful.
2799  *
2800  *  Availability:
2801  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
2802  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
2803  *    Non-Carbon CFM:   not available
2804  }
TXNSetActionNameMappernull2805 function TXNSetActionNameMapper( iTXNObject: TXNObject; iStringForKeyProc: TXNActionNameMapperUPP; iUserData: {const} UnivPtr ): OSStatus; external name '_TXNSetActionNameMapper';
2806 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
2807 
2808 
2809 {
2810  *  TXNUndo()
2811  *
2812  *  Summary:
2813  *    Undo the last command.
2814  *
2815  *  Mac OS X threading:
2816  *    Not thread safe
2817  *
2818  *  Parameters:
2819  *
2820  *    iTXNObject:
2821  *      Opaque TXNObject obtained from TXNCreateObject.
2822  *
2823  *  Availability:
2824  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2825  *    CarbonLib:        in CarbonLib 1.0 and later
2826  *    Non-Carbon CFM:   in Textension 1.0 and later
2827  }
2828 procedure TXNUndo( iTXNObject: TXNObject ); external name '_TXNUndo';
2829 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2830 
2831 
2832 {
2833  *  TXNRedo()
2834  *
2835  *  Summary:
2836  *    Redo the last command.
2837  *
2838  *  Mac OS X threading:
2839  *    Not thread safe
2840  *
2841  *  Parameters:
2842  *
2843  *    iTXNObject:
2844  *      Opaque TXNObject obtained from TXNCreateObject.
2845  *
2846  *  Availability:
2847  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2848  *    CarbonLib:        in CarbonLib 1.0 and later
2849  *    Non-Carbon CFM:   in Textension 1.0 and later
2850  }
2851 procedure TXNRedo( iTXNObject: TXNObject ); external name '_TXNRedo';
2852 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2853 
2854 
2855 {
2856  *  TXNClearUndo()
2857  *
2858  *  Summary:
2859  *    Purge the undo stack
2860  *
2861  *  Mac OS X threading:
2862  *    Not thread safe
2863  *
2864  *  Parameters:
2865  *
2866  *    iTXNObject:
2867  *      Opaque TXNObject obtained from TXNCreateObject.
2868  *
2869  *  Availability:
2870  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
2871  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
2872  *    Non-Carbon CFM:   in Textension not yet available
2873  }
TXNClearUndonull2874 function TXNClearUndo( iTXNObject: TXNObject ): OSStatus; external name '_TXNClearUndo';
2875 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
2876 
2877 
2878 {������������������������������������������������������������������������������������������������������}
2879 {  � Editing                                                                                           }
2880 {������������������������������������������������������������������������������������������������������}
2881 
2882 {
2883  *  TXNCut()
2884  *
2885  *  Summary:
2886  *    Cut the current selection to the clipboard.
2887  *
2888  *  Mac OS X threading:
2889  *    Not thread safe
2890  *
2891  *  Parameters:
2892  *
2893  *    iTXNObject:
2894  *      Opaque TXNObject obtained from TXNCreateObject.
2895  *
2896  *  Result:
2897  *    A result code indicating success or failure.
2898  *
2899  *  Availability:
2900  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2901  *    CarbonLib:        in CarbonLib 1.0 and later
2902  *    Non-Carbon CFM:   in Textension 1.0 and later
2903  }
TXNCutnull2904 function TXNCut( iTXNObject: TXNObject ): OSStatus; external name '_TXNCut';
2905 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2906 
2907 
2908 {
2909  *  TXNCopy()
2910  *
2911  *  Summary:
2912  *    Copy current selection to the clipboard.
2913  *
2914  *  Mac OS X threading:
2915  *    Not thread safe
2916  *
2917  *  Parameters:
2918  *
2919  *    iTXNObject:
2920  *      Opaque TXNObject obtained from TXNCreateObject.
2921  *
2922  *  Result:
2923  *    A result code indicating success or failure.
2924  *
2925  *  Availability:
2926  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2927  *    CarbonLib:        in CarbonLib 1.0 and later
2928  *    Non-Carbon CFM:   in Textension 1.0 and later
2929  }
TXNCopynull2930 function TXNCopy( iTXNObject: TXNObject ): OSStatus; external name '_TXNCopy';
2931 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2932 
2933 
2934 {
2935  *  TXNPaste()
2936  *
2937  *  Summary:
2938  *    Paste from the clipboard.
2939  *
2940  *  Mac OS X threading:
2941  *    Not thread safe
2942  *
2943  *  Parameters:
2944  *
2945  *    iTXNObject:
2946  *      Opaque TXNObject obtained from TXNCreateObject.
2947  *
2948  *  Result:
2949  *    A result code indicating success or failure.
2950  *
2951  *  Availability:
2952  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2953  *    CarbonLib:        in CarbonLib 1.0 and later
2954  *    Non-Carbon CFM:   in Textension 1.0 and later
2955  }
TXNPastenull2956 function TXNPaste( iTXNObject: TXNObject ): OSStatus; external name '_TXNPaste';
2957 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2958 
2959 
2960 {
2961  *  TXNClear()
2962  *
2963  *  Summary:
2964  *    Clear the current selection.
2965  *
2966  *  Mac OS X threading:
2967  *    Not thread safe
2968  *
2969  *  Parameters:
2970  *
2971  *    iTXNObject:
2972  *      Opaque TXNObject obtained from TXNCreateObject.
2973  *
2974  *  Result:
2975  *    A result code indicating success or failure.
2976  *
2977  *  Availability:
2978  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
2979  *    CarbonLib:        in CarbonLib 1.0 and later
2980  *    Non-Carbon CFM:   in Textension 1.0 and later
2981  }
TXNClearnull2982 function TXNClear( iTXNObject: TXNObject ): OSStatus; external name '_TXNClear';
2983 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
2984 
2985 
2986 {
2987  *  TXNIsScrapPastable()
2988  *
2989  *  Summary:
2990  *    Test to see if the current scrap contains data that is supported
2991  *    by Textension.  Used to determine if Paste item in Edit menu
2992  *    should be active or inactive. The types of data supported depends
2993  *    on what data types were specified in the TXNInitTextension
2994  *    options.
2995  *
2996  *  Mac OS X threading:
2997  *    Not thread safe
2998  *
2999  *  Result:
3000  *    Boolean: True if data type in Clipboard is supported.  False if
3001  *    not a supported data type.  If result is True the Paste item in
3002  *    the menu can be highlighted.
3003  *
3004  *  Availability:
3005  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3006  *    CarbonLib:        in CarbonLib 1.0 and later
3007  *    Non-Carbon CFM:   in Textension 1.0 and later
3008  }
TXNIsScrapPastablenull3009 function TXNIsScrapPastable: Boolean; external name '_TXNIsScrapPastable';
3010 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3011 
3012 
3013 {������������������������������������������������������������������������������������������������������}
3014 {  � Selection                                                                                         }
3015 {������������������������������������������������������������������������������������������������������}
3016 
3017 {
3018  *  TXNGetSelection()
3019  *
3020  *  Summary:
3021  *    Get the absolute offsets of the current selection.  Embedded
3022  *    graphics, sound, etc. each count as one character.
3023  *
3024  *  Mac OS X threading:
3025  *    Not thread safe
3026  *
3027  *  Parameters:
3028  *
3029  *    iTXNObject:
3030  *      Opaque TXNObject obtained from TXNCreateObject.
3031  *
3032  *    oStartOffset:
3033  *      Absolute beginning of the current selection.
3034  *
3035  *    oEndOffset:
3036  *      End of current selection.
3037  *
3038  *  Availability:
3039  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3040  *    CarbonLib:        in CarbonLib 1.0 and later
3041  *    Non-Carbon CFM:   in Textension 1.0 and later
3042  }
3043 procedure TXNGetSelection( iTXNObject: TXNObject; var oStartOffset: TXNOffset; var oEndOffset: TXNOffset ); external name '_TXNGetSelection';
3044 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3045 
3046 
3047 {
3048  *  TXNShowSelection()
3049  *
3050  *  Summary:
3051  *    Scroll the current selection into view.
3052  *
3053  *  Mac OS X threading:
3054  *    Not thread safe
3055  *
3056  *  Parameters:
3057  *
3058  *    iTXNObject:
3059  *      Opaque TXNObject obtained from TXNCreateObject.
3060  *
3061  *    iShowEnd:
3062  *      If true the end of the selection is scrolled into view. If
3063  *      false the beginning of selection is scrolled into view.
3064  *
3065  *  Availability:
3066  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3067  *    CarbonLib:        in CarbonLib 1.0 and later
3068  *    Non-Carbon CFM:   in Textension 1.0 and later
3069  }
3070 procedure TXNShowSelection( iTXNObject: TXNObject; iShowEnd: Boolean ); external name '_TXNShowSelection';
3071 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3072 
3073 
3074 {
3075  *  TXNShowOffset()
3076  *
3077  *  Summary:
3078  *    Scroll the text at a specified offset into view.
3079  *
3080  *  Discussion:
3081  *    TXNShowOffset can be used to reveal the text at any offset.
3082  *    TXNShowSelection, in contrast, can only reveal the current
3083  *    selection.
3084  *
3085  *  Mac OS X threading:
3086  *    Not thread safe
3087  *
3088  *  Parameters:
3089  *
3090  *    iTXNObject:
3091  *      Opaque TXNObject obtained from TXNCreateObject.
3092  *
3093  *    inOffset:
3094  *      The offset which will be scrolled into view.
3095  *
3096  *  Availability:
3097  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
3098  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3099  *    Non-Carbon CFM:   not available
3100  }
3101 procedure TXNShowOffset( iTXNObject: TXNObject; inOffset: TXNOffset ); external name '_TXNShowOffset';
3102 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3103 
3104 
3105 {
3106  *  TXNIsSelectionEmpty()
3107  *
3108  *  Summary:
3109  *    Call to find out if the current selection is empty. Use this to
3110  *    determine if Paste, Cut, Copy, Clear should be highlighted in
3111  *    Edit menu.
3112  *
3113  *  Mac OS X threading:
3114  *    Not thread safe
3115  *
3116  *  Parameters:
3117  *
3118  *    iTXNObject:
3119  *      Opaque TXNObject obtained from TXNCreateObject.
3120  *
3121  *  Result:
3122  *    Boolean: True if current selection is empty (i.e. start offset ==
3123  *    end offset). False if selection is not empty.
3124  *
3125  *  Availability:
3126  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3127  *    CarbonLib:        in CarbonLib 1.0 and later
3128  *    Non-Carbon CFM:   in Textension 1.0 and later
3129  }
TXNIsSelectionEmptynull3130 function TXNIsSelectionEmpty( iTXNObject: TXNObject ): Boolean; external name '_TXNIsSelectionEmpty';
3131 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3132 
3133 
3134 {
3135  *  TXNSetSelection()
3136  *
3137  *  Summary:
3138  *    Set the current selection.
3139  *
3140  *  Mac OS X threading:
3141  *    Not thread safe
3142  *
3143  *  Parameters:
3144  *
3145  *    iTXNObject:
3146  *      Opaque TXNObject obtained from TXNCreateObject.
3147  *
3148  *    iStartOffset:
3149  *      New beginning.
3150  *
3151  *    iEndOffset:
3152  *      New end.
3153  *
3154  *  Result:
3155  *    A result code indicating success or failure.
3156  *
3157  *  Availability:
3158  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3159  *    CarbonLib:        in CarbonLib 1.0 and later
3160  *    Non-Carbon CFM:   in Textension 1.0 and later
3161  }
TXNSetSelectionnull3162 function TXNSetSelection( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetSelection';
3163 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3164 
3165 
3166 {������������������������������������������������������������������������������������������������������}
3167 {  � Set/Get Type Attributes                                                                           }
3168 {������������������������������������������������������������������������������������������������������}
3169 
3170 {
3171  *  TXNGetContinuousTypeAttributes()
3172  *
3173  *  Summary:
3174  *    Test the current selection to see if type size, style, color
3175  *    and/or font are continuous. That is is the current selection made
3176  *    up of one font, one font size, one Style, and/or one color.  On
3177  *    return examine the flags to see if the attributes specified were
3178  *    continuous.  If an attribute is continuous then the dataValue
3179  *    field in the TXNTypeAttributes can be examined to get the
3180  *    continous value.  Remember that for color you pass a ptr to an
3181  *    RGBColor in attr[0].data.dataPtr.
3182  *
3183  *  Discussion:
3184  *    If examining kTXNATSUIStyleContinuous bit, be sure to call
3185  *    ATSUDisposeStyle to dispose the style that is returned from MLTE.
3186  *
3187  *  Mac OS X threading:
3188  *    Not thread safe
3189  *
3190  *  Parameters:
3191  *
3192  *    iTXNObject:
3193  *      Opaque TXNObject obtained from TXNCreateObject.
3194  *
3195  *    oContinuousFlags:
3196  *      Bits which can be examined to see if type size, style, color,
3197  *      and/or font are continuous. Example: if (
3198  *      TXNGetContinuousTypeAttributes( txnObject, &flags, 1, &attr )
3199  *      == noErr ) ( if ( flags & kTXNFontContinuousMask ) ....check a
3200  *      font name
3201  *
3202  *    iCount:
3203  *      Count of TXNTypeAttributes records in the ioTypeAttributes
3204  *      array.
3205  *
3206  *    ioTypeAttributes:
3207  *      Array of TXNTypeAttributes that indicate the type attributes
3208  *      the caller is interested in. For example: 1. if you wanted to
3209  *      know if the current selection was continuous in terms of being
3210  *      all one same font size you could do something like this.
3211  *      TXNTypeAttributes       attr[1] = ( kTXNQDFontSizeAttribute,
3212  *      sizeof(Fixed),( 0 ) ) on return from the function if size is
3213  *      continuous (i.e. if the bit 3 of flags is set) then the third
3214  *      field (attr[0].data.dataValue) will contain the size of the
3215  *      font as a Fixed value. 2. if you wanted to know if the current
3216  *      selection was continuous in ATSUI style you could do something
3217  *      like this. TXNTypeAttributes       attr[1] = ( kTXNATSUIStyle,
3218  *      kTXNATSUIStyleSize, ( 0 ) ) on return from the function if
3219  *      ATSUI style is continuous, then the third field
3220  *      (attr[0].data.dataPtr) will contain the ATSUI style.
3221  *
3222  *  Result:
3223  *    A result code indicating success or failure.
3224  *
3225  *  Availability:
3226  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3227  *    CarbonLib:        in CarbonLib 1.0 and later
3228  *    Non-Carbon CFM:   in Textension 1.0 and later
3229  }
TXNGetContinuousTypeAttributesnull3230 function TXNGetContinuousTypeAttributes( iTXNObject: TXNObject; var oContinuousFlags: TXNContinuousFlags; iCount: ItemCount; ioTypeAttributes: {variable-size-array} TXNTypeAttributesPtr { can be NULL } ): OSStatus; external name '_TXNGetContinuousTypeAttributes';
3231 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3232 
3233 
3234 {
3235  *  TXNSetTypeAttributes()
3236  *
3237  *  Summary:
3238  *    Set the current ranges font information.  Values are passed in
3239  *    the attributes array. Values <= sizeof(UInt32) are passed by
3240  *    value. > sizeof(UInt32) are passed as a pointer. That is the
3241  *    TXNTypeAttributes' 3rd field is a union that servers as either a
3242  *    32-bit integer where values can be written or a 32-bit pointer a
3243  *    value.  Functional in NoUserIO mode. When you call
3244  *    TXNSetTypeAttributes, any attributes that you do not set retain
3245  *    their previous values.
3246  *
3247  *  Mac OS X threading:
3248  *    Not thread safe
3249  *
3250  *  Parameters:
3251  *
3252  *    iTXNObject:
3253  *      Opaque TXNObject obtained from TXNCreateObject.
3254  *
3255  *    iAttrCount:
3256  *      Count of type attributes in the TXNTypeAttributes array.
3257  *
3258  *    iAttributes:
3259  *      Attributes that caller would like to set.
3260  *
3261  *    iStartOffset:
3262  *      Start of the range where text attributes should be changed.
3263  *
3264  *    iEndOffset:
3265  *      End of the range.
3266  *
3267  *  Result:
3268  *    A result code indicating success or failure.
3269  *
3270  *  Availability:
3271  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3272  *    CarbonLib:        in CarbonLib 1.0 and later
3273  *    Non-Carbon CFM:   in Textension 1.0 and later
3274  }
TXNSetTypeAttributesnull3275 function TXNSetTypeAttributes( iTXNObject: TXNObject; iAttrCount: ItemCount; {const} iAttributes: {variable-size-array} TXNTypeAttributesPtr; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetTypeAttributes';
3276 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3277 
3278 
3279 {������������������������������������������������������������������������������������������������������}
3280 {  � Set/Get Object Controls                                                                           }
3281 {������������������������������������������������������������������������������������������������������}
3282 
3283 {
3284  *  TXNSetTXNObjectControls()
3285  *
3286  *  Summary:
3287  *    Sets formatting and privileges attributes (such as justification,
3288  *    line direction, tab values, and read-only status) that apply to
3289  *    the entire text object.
3290  *
3291  *  Discussion:
3292  *    On systems that use Apple Type Services for Unicode Imaging
3293  *    (ATSUI), the ATSUI line control attribute tags can be passed to
3294  *    this function in the iControlTag parameter. This is the case for
3295  *    all the ATSUI tags except kATSULineRotationTag. ATSUI tags are
3296  *    applied to the entire text object.
3297  *
3298  *  Mac OS X threading:
3299  *    Not thread safe
3300  *
3301  *  Parameters:
3302  *
3303  *    iTXNObject:
3304  *      The text object that identifies the document for which you want
3305  *      to set formatting and privileges attributes.
3306  *
3307  *    iClearAll:
3308  *      A Boolean value. If you set this to true, all formatting and
3309  *      privileges attributes are reset to their default value. That
3310  *      is, true clears existing tags and resets each to its default
3311  *      value.  This can be done even when the object is in NoUserIO
3312  *      mode.
3313  *
3314  *    iControlCount:
3315  *      The number of items in the iControlTags array.
3316  *
3317  *    iControlTags:
3318  *      An array of values that specifies kind of data that is passed
3319  *      in the iControlData parameter. See �Formatting and Privileges
3320  *      Settings� for a description of possible values. On systems that
3321  *      use Apple Type Services for Unicode Imaging (ATSUI), you can
3322  *      also pass ATSUI attribute tag constants. See the ATSUI
3323  *      documentation for a description of the ATSUI constants. Can be
3324  *      NULL if iClearAll is true.
3325  *
3326  *    iControlData:
3327  *      An array of TXNControlData unions that contain the information
3328  *      your application wants to set. The value you supply to the
3329  *      iControlTags parameter specifies how the union of type
3330  *      TXNControlData is treated. You must make sure that the value
3331  *      you assign to the iControlData parameter is the appropriate
3332  *      type implied by the value you passed in the iControlTags
3333  *      parameter. Can be NULL if iClearAll is true.
3334  *
3335  *  Result:
3336  *    An operating system status code.
3337  *
3338  *  Availability:
3339  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3340  *    CarbonLib:        in CarbonLib 1.0 and later
3341  *    Non-Carbon CFM:   in Textension 1.0 and later
3342  }
TXNSetTXNObjectControlsnull3343 function TXNSetTXNObjectControls( iTXNObject: TXNObject; iClearAll: Boolean; iControlCount: ItemCount; {const} iControlTags: {variable-size-array} TXNControlTagPtr { can be NULL }; {const} iControlData: {variable-size-array} TXNControlDataPtr { can be NULL } ): OSStatus; external name '_TXNSetTXNObjectControls';
3344 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3345 
3346 
3347 {
3348  *  TXNGetTXNObjectControls()
3349  *
3350  *  Summary:
3351  *    Gets the current formatting and privileges attributes (such as
3352  *    justification, line direction, tab values, and read-only status)
3353  *    for a text object.
3354  *
3355  *  Mac OS X threading:
3356  *    Not thread safe
3357  *
3358  *  Parameters:
3359  *
3360  *    iTXNObject:
3361  *      The text object that identifies the document to be activated.
3362  *      If NULL then the default value for an MLTE object is returned.
3363  *
3364  *    iControlCount:
3365  *      The number of items in the iControlTags array.
3366  *
3367  *    iControlTags:
3368  *      An array of values that specify the kind of formatting
3369  *      information you want returned in the oControlData array. See
3370  *      �Formatting and Privileges Settings� for a description of
3371  *      possible values.
3372  *
3373  *    oControlData:
3374  *      An array of TXNControlData unions. On return, the array
3375  *      contains the information that was requested through the
3376  *      iControlTags array. Your application must allocate the
3377  *      oControlData array.
3378  *
3379  *  Result:
3380  *    An operating system status code.
3381  *
3382  *  Availability:
3383  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3384  *    CarbonLib:        in CarbonLib 1.0 and later
3385  *    Non-Carbon CFM:   in Textension 1.0 and later
3386  }
TXNGetTXNObjectControlsnull3387 function TXNGetTXNObjectControls( iTXNObject: TXNObject { can be NULL }; iControlCount: ItemCount; {const} iControlTags: {variable-size-array} TXNControlTagPtr; oControlData: {variable-size-array} TXNControlDataPtr ): OSStatus; external name '_TXNGetTXNObjectControls';
3388 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3389 
3390 
3391 {������������������������������������������������������������������������������������������������������}
3392 {  � Other Settings                                                                                    }
3393 {������������������������������������������������������������������������������������������������������}
3394 
3395 {
3396  *  TXNSetBackground()
3397  *
3398  *  Summary:
3399  *    Set the type of background the TXNObject's text, etc. is drawn
3400  *    onto.  At this point the background can be a color.  Functional
3401  *    in NoUserIO mode.
3402  *
3403  *  Mac OS X threading:
3404  *    Not thread safe
3405  *
3406  *  Parameters:
3407  *
3408  *    iTXNObject:
3409  *      Opaque TXNObject obtained from TXNCreateObject.
3410  *
3411  *    iBackgroundInfo:
3412  *      Struct containing information that describes the background.
3413  *
3414  *  Result:
3415  *    A result code indicating success or failure.
3416  *
3417  *  Availability:
3418  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3419  *    CarbonLib:        in CarbonLib 1.0 and later
3420  *    Non-Carbon CFM:   in Textension 1.0 and later
3421  }
TXNSetBackgroundnull3422 function TXNSetBackground( iTXNObject: TXNObject; const (*var*) iBackgroundInfo: TXNBackground ): OSStatus; external name '_TXNSetBackground';
3423 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3424 
3425 
3426 {
3427  *  TXNEchoMode()
3428  *
3429  *  Summary:
3430  *    Put the TXNObject into echo mode. What that means is that all
3431  *    characters in the TXNObject have the character 'echoCharacter'
3432  *    substituted for the actual glyph when drawing occurs.
3433  *
3434  *  Discussion:
3435  *    Note that the echoCharacter is typed as a UniChar, but this is
3436  *    done merely to facilitate passing any 2 byte character.  The
3437  *    encoding parameter actually determines the encoding used to
3438  *    locate a font and display a character.  Thus if you wanted to
3439  *    display the diamond found in the Shift-JIS encoding for MacOS you
3440  *    would pass in 0x86A6 for the character but an encoding that was
3441  *    built to represent the MacOS Japanese encoding.
3442  *
3443  *  Mac OS X threading:
3444  *    Not thread safe
3445  *
3446  *  Parameters:
3447  *
3448  *    iTXNObject:
3449  *      Opaque TXNObject obtained from TXNCreateObject.
3450  *
3451  *    iEchoCharacter:
3452  *      Character to use in substitution.
3453  *
3454  *    iEncoding:
3455  *      Encoding from which character is drawn.
3456  *
3457  *    iOn:
3458  *      True if turning EchoMode on.  False if turning it off.
3459  *
3460  *  Result:
3461  *    A result code indicating success or failure.
3462  *
3463  *  Availability:
3464  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3465  *    CarbonLib:        in CarbonLib 1.0 and later
3466  *    Non-Carbon CFM:   in Textension 1.0 and later
3467  }
TXNEchoModenull3468 function TXNEchoMode( iTXNObject: TXNObject; iEchoCharacter: UniChar; iEncoding: TextEncoding; iOn: Boolean ): OSStatus; external name '_TXNEchoMode';
3469 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3470 
3471 
3472 {������������������������������������������������������������������������������������������������������}
3473 {  � Retrieve Run Info                                                                                 }
3474 {������������������������������������������������������������������������������������������������������}
3475 
3476 {
3477  *  TXNCountRunsInRange()
3478  *
3479  *  Summary:
3480  *    Given a range specified by the starting and ending offset return
3481  *    a count of the runs in that range.  Run in this case means
3482  *    changes in TextSyles or a graphic or sound.
3483  *
3484  *  Mac OS X threading:
3485  *    Not thread safe
3486  *
3487  *  Parameters:
3488  *
3489  *    iTXNObject:
3490  *      Opaque TXNObject obtained from TXNCreateObject.
3491  *
3492  *    iStartOffset:
3493  *      Start of range.
3494  *
3495  *    iEndOffset:
3496  *      End of range.
3497  *
3498  *    oRunCount:
3499  *      Count of runs in the range
3500  *
3501  *  Result:
3502  *    A result code indicating success or failure.
3503  *
3504  *  Availability:
3505  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3506  *    CarbonLib:        in CarbonLib 1.0 and later
3507  *    Non-Carbon CFM:   in Textension 1.0 and later
3508  }
TXNCountRunsInRangenull3509 function TXNCountRunsInRange( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oRunCount: ItemCount ): OSStatus; external name '_TXNCountRunsInRange';
3510 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3511 
3512 
3513 {
3514  *  TXNGetIndexedRunInfoFromRange()
3515  *
3516  *  Summary:
3517  *    Gets information about a run in a range of data.
3518  *
3519  *  Discussion:
3520  *    You should first call the TXNCountRunsInRange function to get the
3521  *    count. The TXNTypeAttributes structure must specify the text
3522  *    attribute in which the application is interested. In other words,
3523  *    the tag field must be set. If you asked for the kTXNATSUIStyle
3524  *    info, you are now responsible for disposing the ATSUI style
3525  *    returned from the attribute array by calling ATSUDisposeStyle.
3526  *
3527  *  Mac OS X threading:
3528  *    Not thread safe
3529  *
3530  *  Parameters:
3531  *
3532  *    iTXNObject:
3533  *      The text object for the current text area.
3534  *
3535  *    iIndex:
3536  *      The value that corresponds to the run for which you want to get
3537  *      information. You call the TXNCountRunsInRange function to get
3538  *      the number of runs in a range. The iIndex parameter is
3539  *      zero-based, so its possible values are from 0 to the number of
3540  *      runs in a range minus 1.
3541  *
3542  *    iStartOffset:
3543  *      The offset at which you want to start to obtain run information.
3544  *
3545  *    iEndOffset:
3546  *      The offset at which you want run information to end.
3547  *
3548  *    oRunStartOffset:
3549  *      On return, a pointer to a value that identifies the start of
3550  *      run relative to the beginning of the text, not the beginning of
3551  *      the range you specified in the iStartOffset parameter.
3552  *
3553  *    oRunEndOffset:
3554  *      On return, a pointer to a value that identifies the end of the
3555  *      run relative to the beginning of the text, not the beginning of
3556  *      the range you specified in the iStartOffset parameter.
3557  *
3558  *    oRunDataType:
3559  *      On return, a pointer to a value that identifies the type of
3560  *      data in the run. See �Supported Data Types� for a description
3561  *      of possible values.
3562  *
3563  *    iTypeAttributeCount:
3564  *      The number of font attributes.
3565  *
3566  *    ioTypeAttributes:
3567  *      A pointer to a structure of type TXNTypeAttributes. On input,
3568  *      you specify the attribute (such as size) in the tag field and
3569  *      the attribute size in the size field. You can pass NULL for the
3570  *      data field. On return, the data field contains the attribute
3571  *      data. The data field is a union that serves either as a 32-bit
3572  *      integer or a 32-bit pointer, depending on the size field.
3573  *
3574  *  Result:
3575  *    An operating system status code.
3576  *
3577  *  Availability:
3578  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3579  *    CarbonLib:        in CarbonLib 1.0 and later
3580  *    Non-Carbon CFM:   in Textension 1.0 and later
3581  }
TXNGetIndexedRunInfoFromRangenull3582 function TXNGetIndexedRunInfoFromRange( iTXNObject: TXNObject; iIndex: ItemCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset; oRunStartOffset: TXNOffsetPtr { can be NULL }; oRunEndOffset: TXNOffsetPtr { can be NULL }; oRunDataType: TXNDataTypePtr { can be NULL }; iTypeAttributeCount: ItemCount; ioTypeAttributes: TXNTypeAttributesPtr { can be NULL } ): OSStatus; external name '_TXNGetIndexedRunInfoFromRange';
3583 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3584 
3585 
3586 {������������������������������������������������������������������������������������������������������}
3587 {  � Get Data Size                                                                                     }
3588 {������������������������������������������������������������������������������������������������������}
3589 
3590 {
3591  *  TXNDataSize()
3592  *
3593  *  Summary:
3594  *    Return the size in bytes of the characters in a given TXNObject.
3595  *
3596  *  Mac OS X threading:
3597  *    Not thread safe
3598  *
3599  *  Parameters:
3600  *
3601  *    iTXNObject:
3602  *      Opaque TXNObject obtained from TXNCreateObject.
3603  *
3604  *  Result:
3605  *    The bytes required to hold the characters.
3606  *
3607  *  Availability:
3608  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3609  *    CarbonLib:        in CarbonLib 1.0 and later
3610  *    Non-Carbon CFM:   in Textension 1.0 and later
3611  }
TXNDataSizenull3612 function TXNDataSize( iTXNObject: TXNObject ): ByteCount; external name '_TXNDataSize';
3613 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3614 
3615 
3616 {������������������������������������������������������������������������������������������������������}
3617 {  � Read and Write APIs                                                                           }
3618 {������������������������������������������������������������������������������������������������������}
3619 
3620 
3621 {
3622  *  TXNWriteRangeToCFURL()
3623  *
3624  *  Summary:
3625  *    Write a range of a TXNObject to a CFURLRef.
3626  *
3627  *  Discussion:
3628  *    Write a range of a text object to a file or a special file bundle
3629  *    (directory). It supports different document formats and encodings
3630  *    which can be specified in the data options dictionary. Clients
3631  *    can specify additional document attributes when data is written
3632  *    out using a file format that supports such attributes (ie. RTF
3633  *    and native MLTE file format). See DocumentAttribute key
3634  *    definitions for additional information on the attributes
3635  *    supported.
3636  *
3637  *  Mac OS X threading:
3638  *    Not thread safe
3639  *
3640  *  Parameters:
3641  *
3642  *    iTXNObject:
3643  *      Opaque TXNObject obtained from TXNCreateObject.
3644  *
3645  *    iStartOffset:
3646  *      The initial offset in iTXNObject to write out to iFileURL.
3647  *
3648  *    iEndOffset:
3649  *      The last offset in iTXNObject to write out to iFileURL.
3650  *
3651  *    iDataOptions:
3652  *      A CFDictionaryRef that specifies options for writing out the
3653  *      data. See Data Options key documentation for a list of the
3654  *      options supported. If this parameter is NULL, the data is
3655  *      written out using MLTE's native format.
3656  *
3657  *    iDocumentAttributes:
3658  *      Specifies the document attributes to be embedded in the data
3659  *      stream. This param is only supported when writing out the data
3660  *      using one of the following formats: RTF and MLTE native format.
3661  *      Only the key / values defined in Document Attributes are
3662  *      written out. The content of the dictionary is ignored for any
3663  *      other format. If the dictionary is NULL, no attributes are
3664  *      added to the data stream.
3665  *
3666  *    iFileURL:
3667  *      Should point to an existing file or directory whichever is
3668  *      correct for file type. On exit, iFileURL will contain a copy of
3669  *      the data in the given range for the iTXNObject with the format
3670  *      and encoding specified by iDataOptions.
3671  *
3672  *  Result:
3673  *    A result code indicating success or failure.
3674  *
3675  *  Availability:
3676  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
3677  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
3678  *    Non-Carbon CFM:   not available
3679  }
TXNWriteRangeToCFURLnull3680 function TXNWriteRangeToCFURL( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; iDataOptions: CFDictionaryRef { can be NULL }; iDocumentAttributes: CFDictionaryRef { can be NULL }; iFileURL: CFURLRef ): OSStatus; external name '_TXNWriteRangeToCFURL';
3681 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3682 
3683 
3684 {
3685  *  TXNReadFromCFURL()
3686  *
3687  *  Summary:
3688  *    Read data from a CFURLRef into a TXNObject.
3689  *
3690  *  Discussion:
3691  *    Read in data from a file or or special file bundle (directory)
3692  *    into a text object. Offset parameters are used to specify whether
3693  *    the new data is inserted, appended or replaces an existing data
3694  *    range in the text object. Clients can specify the document format
3695  *    and encoding of the data using the DataOptions dictionary. This
3696  *    functions also returns the document attributes present in the
3697  *    data stream. Document attributes are only supported for the rich
3698  *    text file formats supported by MLTE: RTF and MLTE native file
3699  *    format.
3700  *
3701  *  Mac OS X threading:
3702  *    Not thread safe
3703  *
3704  *  Parameters:
3705  *
3706  *    iTXNObject:
3707  *      Opaque TXNObject obtained from TXNCreateObject. New data will
3708  *      be added to this object.
3709  *
3710  *    iStartOffset:
3711  *      The initial offset in iTXNObject to place the data read in from
3712  *      iFileURL.
3713  *
3714  *    iEndOffset:
3715  *      The last offset in iTXNObject to place the data read in from
3716  *      iFileURL.
3717  *
3718  *    iDataOptions:
3719  *      A CFDictionaryRef that specifies options for reading in the
3720  *      data. See Data Options key documentation for a list of the
3721  *      options supported. If this parameter is NULL, the data is
3722  *      written out using MLTE's native format.
3723  *
3724  *    iFileURL:
3725  *      A value of type CFURLRef. The data to be added to the
3726  *      iTXNObject.
3727  *
3728  *    oDocumentAttributes:
3729  *      A value of type CFDictionaryRef. It contains the document
3730  *      attributes for the text object. On exit, this dictionary
3731  *      contains the document attributes present in the data stream, if
3732  *      the file format supports them; otherwise it will be NULL. The
3733  *      native MLTE file format and RTF support embedded document
3734  *      attributes. See the DocumentAttribute key documentation for a
3735  *      list of the attributes supported. If this parameter is NULL, no
3736  *      document attributes are written out. Sample code: If the caller
3737  *      passes a pointer to a dictionary ref, the API will return a ref
3738  *      to the dictionary of attributes if there is one (caller must
3739  *      release dictionary), otherwise the API will set the ref to NULL
3740  *      in all other cases. CFDictionaryRef oDocumentAttributes = NULL;
3741  *      status = TXNReadFromCFURL (...., &oDocumentAttributes); if
3742  *      (oDocumentAttributes != NULL) ::CFRelease(oDocumentAttributes);
3743  *
3744  *  Result:
3745  *    A result code indicating success or failure.
3746  *
3747  *  Availability:
3748  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
3749  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
3750  *    Non-Carbon CFM:   not available
3751  }
TXNReadFromCFURLnull3752 function TXNReadFromCFURL( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; iDataOptions: CFDictionaryRef { can be NULL }; iFileURL: CFURLRef; oDocumentAttributes: CFDictionaryRefPtr { can be NULL } ): OSStatus; external name '_TXNReadFromCFURL';
3753 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3754 
3755 
3756 {
3757  *  TXNCopyTypeIdentifiersForRange()
3758  *
3759  *  Summary:
3760  *    Returns an array of univeral type identifiers (UTIs) that can be
3761  *    used to write out a range of a text object with no information
3762  *    loss.
3763  *
3764  *  Discussion:
3765  *    Some file formats support limited embedding of data when writing
3766  *    out to disk, and use attachments instead, such as RTF. This API
3767  *    can be used to determine the document format to use with
3768  *    TXNWriteRangeToCFURL - i.e., whether to use RTF (Rich Text
3769  *    Format). Note that support for new document formats could be
3770  *    added in the future.
3771  *
3772  *  Mac OS X threading:
3773  *    Not thread safe
3774  *
3775  *  Parameters:
3776  *
3777  *    iTXNObject:
3778  *      Opaque TXNObject obtained from TXNCreateObject.
3779  *
3780  *    iStartOffset:
3781  *      The initial offset in iTXNObject for the range to check.
3782  *
3783  *    iEndOffset:
3784  *      The last offset in iTXNObject for the range to check.
3785  *
3786  *    oTypeIdentifiersForRange:
3787  *      A pointer to a CFArrayRef. On exit, the array will contain the
3788  *      list of universal type identifiers (UTI) that MLTE supports,
3789  *      and that can be used to write the object out to disk with no
3790  *      data loss. Each entry in the array is a CFStringRef.
3791  *
3792  *  Result:
3793  *    A result code indicating success or failure.
3794  *
3795  *  Availability:
3796  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
3797  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
3798  *    Non-Carbon CFM:   not available
3799  }
TXNCopyTypeIdentifiersForRangenull3800 function TXNCopyTypeIdentifiersForRange( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oTypeIdentifiersForRange: CFArrayRef ): OSStatus; external name '_TXNCopyTypeIdentifiersForRange';
3801 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
3802 
3803 
3804 {
3805  *  TXNGetData()
3806  *
3807  *  Summary:
3808  *    Copy the data in the range specified by startOffset and endOffset.
3809  *
3810  *  Discussion:
3811  *    This function should be used in conjunction with TXNNextDataRun.
3812  *    The client would call TXNCountRunsInRange to the number of data
3813  *    runs in a given range.  The client can then walk the runs with
3814  *    the function TXNGetIndexedRunInfoFromRange.
3815  *    TXNGetIndexedRunInfoFromRange lets you examine each runs type and
3816  *    text attributes. For each data run of interest (i.e. one whose
3817  *    data the caller wanted to look at) the client would call
3818  *    TXNGetData. The handle passed to TXNGetData should not be
3819  *    allocated. TXNGetData takes care of allocating the dataHandle as
3820  *    necessary.  However, the caller is responsible for disposing the
3821  *    handle.
3822  *
3823  *  Mac OS X threading:
3824  *    Not thread safe
3825  *
3826  *  Parameters:
3827  *
3828  *    iTXNObject:
3829  *      Opaque TXNObject obtained from TXNCreateObject.
3830  *
3831  *    iStartOffset:
3832  *      Absolute offset from which data copy should begin.
3833  *
3834  *    iEndOffset:
3835  *      Absolute offset at which data copy should end.
3836  *
3837  *    oDataHandle:
3838  *      If noErr a new handle containing the requested data. The caller
3839  *      is responsible for disposing the handle.  Note that the handle
3840  *      is a copy so it can be safely disposed at any time.
3841  *
3842  *  Result:
3843  *    Memory errors or TXN_IllegalToCrossDataBoundaries if offsets
3844  *    specify a range that crosses a data type boundary.
3845  *
3846  *  Availability:
3847  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3848  *    CarbonLib:        in CarbonLib 1.0 and later
3849  *    Non-Carbon CFM:   in Textension 1.0 and later
3850  }
TXNGetDatanull3851 function TXNGetData( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oDataHandle: Handle ): OSStatus; external name '_TXNGetData';
3852 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3853 
3854 
3855 {
3856  *  TXNGetDataEncoded()
3857  *
3858  *  Summary:
3859  *    Copy the data in the range specified by startOffset and endOffset.
3860  *
3861  *  Discussion:
3862  *    The handle passed to TXNGetDataEncoded should not be allocated.
3863  *    TXNGetData takes care of allocating the dataHandle as necessary.
3864  *    However, the caller is responsible for disposing the handle.
3865  *
3866  *  Mac OS X threading:
3867  *    Not thread safe
3868  *
3869  *  Parameters:
3870  *
3871  *    iTXNObject:
3872  *      Opaque TXNObject obtained from TXNCreateObject.
3873  *
3874  *    iStartOffset:
3875  *      Absolute offset from which data copy should begin.
3876  *
3877  *    iEndOffset:
3878  *      Absolute offset at which data copy should end.
3879  *
3880  *    oDataHandle:
3881  *      If noErr a new handle containing the requested data.
3882  *
3883  *    iEncoding:
3884  *      should be kTXNTextData or kTXNUnicodeTextData.
3885  *
3886  *  Result:
3887  *    Memory errors or  TXN_IllegalToCrossDataBoundaries if offsets
3888  *    specify a range that crosses a data type boundary.
3889  *
3890  *  Availability:
3891  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3892  *    CarbonLib:        in CarbonLib 1.0 and later
3893  *    Non-Carbon CFM:   in Textension 1.0 and later
3894  }
TXNGetDataEncodednull3895 function TXNGetDataEncoded( iTXNObject: TXNObject; iStartOffset: TXNOffset; iEndOffset: TXNOffset; var oDataHandle: Handle; iEncoding: TXNDataType ): OSStatus; external name '_TXNGetDataEncoded';
3896 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3897 
3898 
3899 {
3900  *  TXNSetData()
3901  *
3902  *  Summary:
3903  *    Replaces a range of data (text, graphics, and so forth).
3904  *
3905  *  Discussion:
3906  *    Functional in NoUserIO mode.
3907  *
3908  *  Mac OS X threading:
3909  *    Not thread safe
3910  *
3911  *  Parameters:
3912  *
3913  *    iTXNObject:
3914  *      The text object that identifies the document in which you want
3915  *      to replace data.
3916  *
3917  *    iDataType:
3918  *      The type of the replacement data. See �Supported Data Types�
3919  *      for a description of possible values.
3920  *
3921  *    iDataPtr:
3922  *      A pointer to the data that will replace the data that is in the
3923  *      range specified by the iStartOffset and iEndOffset parameters.
3924  *      Can be NULL if the start and end offsets are different.
3925  *
3926  *    iDataSize:
3927  *      The size of the data to which iDataPtr points.
3928  *
3929  *    iStartOffset:
3930  *      The beginning of the range of data to replace. You can use the
3931  *      TXNGetSelection function to get the absolute offsets of the
3932  *      current selection.
3933  *
3934  *    iEndOffset:
3935  *      The end of the range to replace. You can use the
3936  *      TXNGetSelection function to get the absolute offsets of the
3937  *      current selection. If you want to insert text, the ending and
3938  *      starting offsets should be the same value.
3939  *
3940  *  Result:
3941  *    An operating system status code.
3942  *
3943  *  Availability:
3944  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
3945  *    CarbonLib:        in CarbonLib 1.0 and later
3946  *    Non-Carbon CFM:   in Textension 1.0 and later
3947  }
TXNSetDatanull3948 function TXNSetData( iTXNObject: TXNObject; iDataType: TXNDataType; iDataPtr: {const} UnivPtr { can be NULL }; iDataSize: ByteCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetData';
3949 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
3950 
3951 
3952 {
3953  *  TXNFlattenObjectToCFDataRef()
3954  *
3955  *  Summary:
3956  *    Flattens a text object so it can be saved to disk or embedded
3957  *    with other data.
3958  *
3959  *  Mac OS X threading:
3960  *    Not thread safe
3961  *
3962  *  Parameters:
3963  *
3964  *    iTXNObject:
3965  *      Opaque TXNObject obtained from TXNCreateObject.  Retrieve
3966  *      flattened data from this text object.
3967  *
3968  *    iTXNDataType:
3969  *      A value of type TXNDataType that specifies the format in which
3970  *      the data is written out.
3971  *
3972  *    oDataRef:
3973  *      A pointer to a structure of type CFDataRef. On return the data
3974  *      will contain a flattened version of the iTXNObject in the
3975  *      format specified by iTXNDataType. Clients are responsible to
3976  *      retain the returned CFDataRef.
3977  *
3978  *  Result:
3979  *    A result code indicating success or failure.
3980  *
3981  *  Availability:
3982  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
3983  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
3984  *    Non-Carbon CFM:   not available
3985  }
TXNFlattenObjectToCFDataRefnull3986 function TXNFlattenObjectToCFDataRef( iTXNObject: TXNObject; iTXNDataType: TXNDataType; var oDataRef: CFDataRef ): OSStatus; external name '_TXNFlattenObjectToCFDataRef';
3987 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
3988 
3989 
3990 {������������������������������������������������������������������������������������������������������}
3991 {  � Revert                                                                                            }
3992 {������������������������������������������������������������������������������������������������������}
3993 
3994 {
3995  *  TXNRevert()
3996  *
3997  *  Summary:
3998  *    Revert  to the last saved version of this document.  If the file
3999  *    was not previously saved the document is reverted to an empty
4000  *    document.
4001  *
4002  *  Mac OS X threading:
4003  *    Not thread safe
4004  *
4005  *  Parameters:
4006  *
4007  *    iTXNObject:
4008  *      Opaque TXNObject obtained from TXNCreateObject.
4009  *
4010  *  Result:
4011  *    A result code indicating success or failure. (such as File
4012  *    Manager errors)
4013  *
4014  *  Availability:
4015  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4016  *    CarbonLib:        in CarbonLib 1.0 and later
4017  *    Non-Carbon CFM:   in Textension 1.0 and later
4018  }
TXNRevertnull4019 function TXNRevert( iTXNObject: TXNObject ): OSStatus; external name '_TXNRevert';
4020 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4021 
4022 
4023 {������������������������������������������������������������������������������������������������������}
4024 {  � Printing                                                                                          }
4025 {������������������������������������������������������������������������������������������������������}
4026 
4027 {
4028  *  TXNPageSetup()
4029  *
4030  *  Summary:
4031  *    Display the Page Setup dialog of the current default printer and
4032  *    react to any changes (i.e. Reformat the text if the page layout
4033  *    changes.)
4034  *
4035  *  Mac OS X threading:
4036  *    Not thread safe
4037  *
4038  *  Parameters:
4039  *
4040  *    iTXNObject:
4041  *      Opaque TXNObject obtained from TXNCreateObject.
4042  *
4043  *  Result:
4044  *    A result code indicating success or failure. ( such as Print
4045  *    Manager errors )
4046  *
4047  *  Availability:
4048  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4049  *    CarbonLib:        in CarbonLib 1.0 and later
4050  *    Non-Carbon CFM:   in Textension 1.0 and later
4051  }
TXNPageSetupnull4052 function TXNPageSetup( iTXNObject: TXNObject ): OSStatus; external name '_TXNPageSetup';
4053 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4054 
4055 
4056 {
4057  *  TXNPrint()
4058  *
4059  *  Summary:
4060  *    Print the document.
4061  *
4062  *  Mac OS X threading:
4063  *    Not thread safe
4064  *
4065  *  Parameters:
4066  *
4067  *    iTXNObject:
4068  *      Opaque TXNObject obtained from TXNCreateObject.
4069  *
4070  *  Result:
4071  *    A result code indicating success or failure. ( such as Print
4072  *    Manager errors )
4073  *
4074  *  Availability:
4075  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4076  *    CarbonLib:        in CarbonLib 1.0 and later
4077  *    Non-Carbon CFM:   in Textension 1.0 and later
4078  }
TXNPrintnull4079 function TXNPrint( iTXNObject: TXNObject ): OSStatus; external name '_TXNPrint';
4080 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4081 
4082 
4083 {������������������������������������������������������������������������������������������������������}
4084 {  � Search                                                                                            }
4085 {������������������������������������������������������������������������������������������������������}
4086 
4087 {
4088  *  TXNFind()
4089  *
4090  *  Summary:
4091  *    Find a piece of text or a graphics object.
4092  *
4093  *  Discussion:
4094  *    The default matching behavior is pretty simple for Text a basic
4095  *    binary compare is done.  If the matchOptions say to ignore case
4096  *    the characters to be searched are duplicated and case
4097  *    neutralized. This naturally can fail due to lack of memory if
4098  *    there is a large amount of text.  It also slows things down.  If
4099  *    MatchOptions say find an entire word that once a match is found
4100  *    an effort is made to determine if the match is a word.  The
4101  *    default behavior is to test the character before and after the to
4102  *    see if it is White space.  If the kTXNUseEncodingWordRulesBit is
4103  *    set than the Script Manager's FindWord function is called to make
4104  *    this determination. If the caller is looking for a non-text type
4105  *    than each non-text type in the document is returned. If more
4106  *    elaborate ( a regular expression processor or whatever ) is what
4107  *    you want then that is what the FindProc is for.
4108  *
4109  *  Mac OS X threading:
4110  *    Not thread safe
4111  *
4112  *  Parameters:
4113  *
4114  *    iTXNObject:
4115  *      Opaque TXNObject obtained from TXNCreateObject.
4116  *
4117  *    iMatchTextDataPtr:
4118  *      Ptr to a MatchTextRecord which contains the text to match, the
4119  *      length of that text and the TextEncoding the text is encoded
4120  *      in.  This must be there if you are looking for Text, but can be
4121  *      NULL if you are looking for a graphics object.
4122  *
4123  *    iDataType:
4124  *      The type of data to find.  This can be any of the types defined
4125  *      in TXNDataType enum (TEXT, PICT, moov, snd ).  However, if
4126  *      PICT, moov, or snd is passed then the default behavior is to
4127  *      match on any non-Text object.  If you really want to find a
4128  *      specific type you can provide a custom find callback or ignore
4129  *      matches which aren't the precise type you are interested in.
4130  *
4131  *    iMatchOptions:
4132  *      Options on what to search for.
4133  *
4134  *    iStartSearchOffset:
4135  *      The offset at which a search should begin. The constant
4136  *      kTXNStartOffset specifies the start of the objects data.
4137  *
4138  *    iEndSearchOffset:
4139  *      The offset at which the search should end. The constant
4140  *      kTXNEndOffset specifies the end of the objects data.
4141  *
4142  *    iFindProc:
4143  *      A custom callback.  If will be called to match things rather
4144  *      than the default matching behavior.
4145  *
4146  *    iRefCon:
4147  *      This can be use for whatever the caller likes.  It is passed to
4148  *      the FindProc (if a FindProc is provided.
4149  *
4150  *    oStartMatchOffset:
4151  *      Absolute offset to start of match.  set to 0xFFFFFFFF if not
4152  *      match.
4153  *
4154  *    oEndMatchOffset:
4155  *      Absolute offset to end of match.  Set to 0xFFFFFFFF is no match.
4156  *
4157  *  Result:
4158  *    A result code indicating success or failure.
4159  *
4160  *  Availability:
4161  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4162  *    CarbonLib:        in CarbonLib 1.0 and later
4163  *    Non-Carbon CFM:   in Textension 1.0 and later
4164  }
TXNFindnull4165 function TXNFind( iTXNObject: TXNObject; {const} iMatchTextDataPtr: TXNMatchTextRecordPtr { can be NULL }; iDataType: TXNDataType; iMatchOptions: TXNMatchOptions; iStartSearchOffset: TXNOffset; iEndSearchOffset: TXNOffset; iFindProc: TXNFindUPP; iRefCon: SRefCon; var oStartMatchOffset: TXNOffset; var oEndMatchOffset: TXNOffset ): OSStatus; external name '_TXNFind';
4166 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4167 
4168 
4169 {������������������������������������������������������������������������������������������������������}
4170 {  � Static Text Box                                                                                   }
4171 {������������������������������������������������������������������������������������������������������}
4172 
4173 {
4174  *  TXNDrawUnicodeTextBox()   *** DEPRECATED ***
4175  *
4176  *  Deprecated:
4177  *    Use HIThemeDrawTextBox, CoreText (CTLineDraw,..) or Cocoa
4178  *    (NSStringDrawing,..)
4179  *
4180  *  Summary:
4181  *    Draws a Unicode string in the specified rectangle.
4182  *
4183  *  Discussion:
4184  *    Client is supposed to do an EraseRect if needed. The drawing will
4185  *    be clipped to the rect unless the client specifies a rotation.
4186  *    Use kTXNUseVerticalTextMask to display text vertically (no need
4187  *    to use the kTXNRotateTextMask flag in this case).
4188  *
4189  *  Mac OS X threading:
4190  *    Not thread safe
4191  *
4192  *  Parameters:
4193  *
4194  *    iText:
4195  *      Ptr to a Unicode string (UTF16 chars).
4196  *
4197  *    iLen:
4198  *      Number of UniChars in iText (this is not the size of iText).
4199  *
4200  *    ioBox:
4201  *      On input the text box where the text will be displayed. On
4202  *      return will be updated to reflect the minimum bounding Rect
4203  *      that will enclose the text (unless kTXNDontUpdateBoxRectMask is
4204  *      used).
4205  *
4206  *    iStyle:
4207  *      Style to use to display the text.
4208  *
4209  *    iOptions:
4210  *      Can be used to specify non-default behavior.
4211  *
4212  *  Result:
4213  *    An operating system status code.
4214  *
4215  *  Availability:
4216  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.6
4217  *    CarbonLib:        in CarbonLib 1.1 and later
4218  *    Non-Carbon CFM:   in Textension 1.1 and later
4219  }
TXNDrawUnicodeTextBoxnull4220 function TXNDrawUnicodeTextBox( {const} iText: {variable-size-array} UniCharPtr; iLen: UniCharCount; var ioBox: Rect; iStyle: ATSUStyle { can be NULL }; {const} iOptions: TXNTextBoxOptionsDataPtr { can be NULL } ): OSStatus; external name '_TXNDrawUnicodeTextBox';
4221 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
4222 
4223 
4224 {
4225  *  TXNDrawCFStringTextBox()   *** DEPRECATED ***
4226  *
4227  *  Deprecated:
4228  *    Use HIThemeDrawTextBox, CoreText (CTLineDraw,..) or Cocoa
4229  *    (NSStringDrawing,..)
4230  *
4231  *  Summary:
4232  *    Draws a CFString in the specified rectangle.
4233  *
4234  *  Discussion:
4235  *    Client is supposed to do an EraseRect if needed. The drawing will
4236  *    be clipped to the rect unless the client specifies a rotation.
4237  *    Use kTXNUseVerticalTextMask to display text vertically (no need
4238  *    to use the kTXNRotateTextMask flag in this case).
4239  *
4240  *  Mac OS X threading:
4241  *    Not thread safe
4242  *
4243  *  Parameters:
4244  *
4245  *    iText:
4246  *      A CFStringRef (see CFBase.h and CFString.h).
4247  *
4248  *    ioBox:
4249  *      On input the text box where the text will be displayed. On
4250  *      return will be updated to reflect the minimum bounding Rect
4251  *      that will enclose the text (unless kTXNDontUpdateBoxRectMask is
4252  *      used).
4253  *
4254  *    iStyle:
4255  *      Style to use to display the text.
4256  *
4257  *    iOptions:
4258  *      Can be used to specify non-default behavior.
4259  *
4260  *  Result:
4261  *    An operating system status code.
4262  *
4263  *  Availability:
4264  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.6
4265  *    CarbonLib:        in CarbonLib 1.1 and later
4266  *    Non-Carbon CFM:   not available
4267  }
TXNDrawCFStringTextBoxnull4268 function TXNDrawCFStringTextBox( iText: CFStringRef; var ioBox: Rect; iStyle: ATSUStyle { can be NULL }; {const} iOptions: TXNTextBoxOptionsDataPtr { can be NULL } ): OSStatus; external name '_TXNDrawCFStringTextBox';
4269 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_6 *)
4270 
4271 
4272 {������������������������������������������������������������������������������������������������������}
4273 {  � Get Line Info                                                                                     }
4274 {������������������������������������������������������������������������������������������������������}
4275 
4276 {
4277  *  TXNGetLineCount()
4278  *
4279  *  Summary:
4280  *    Get the total number of lines in the TXNObject.
4281  *
4282  *  Mac OS X threading:
4283  *    Not thread safe
4284  *
4285  *  Parameters:
4286  *
4287  *    iTXNObject:
4288  *      Opaque TXNObject obtained from TXNCreateObject.
4289  *
4290  *    oLineTotal:
4291  *      On return the total number of lines in the object.
4292  *
4293  *  Result:
4294  *    An operating system status code.
4295  *
4296  *  Availability:
4297  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4298  *    CarbonLib:        in CarbonLib 1.1 and later
4299  *    Non-Carbon CFM:   in Textension 1.1 and later
4300  }
TXNGetLineCountnull4301 function TXNGetLineCount( iTXNObject: TXNObject; var oLineTotal: ItemCount ): OSStatus; external name '_TXNGetLineCount';
4302 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4303 
4304 
4305 {
4306  *  TXNGetLineMetrics()
4307  *
4308  *  Summary:
4309  *    Get the metrics for the specified line.
4310  *
4311  *  Mac OS X threading:
4312  *    Not thread safe
4313  *
4314  *  Parameters:
4315  *
4316  *    iTXNObject:
4317  *      Opaque TXNObject obtained from TXNCreateObject.
4318  *
4319  *    iLineNumber:
4320  *      The line we want the metrics for (0 based).
4321  *
4322  *    oLineWidth:
4323  *      On return the width of the line (in Fixed format).
4324  *
4325  *    oLineHeight:
4326  *      On return the height (ascent + descent) of the line (in Fixed
4327  *      format).
4328  *
4329  *  Result:
4330  *    An operating system status code.
4331  *
4332  *  Availability:
4333  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4334  *    CarbonLib:        in CarbonLib 1.1 and later
4335  *    Non-Carbon CFM:   in Textension 1.1 and later
4336  }
TXNGetLineMetricsnull4337 function TXNGetLineMetrics( iTXNObject: TXNObject; iLineNumber: UNSIGNEDLONG; var oLineWidth: Fixed; var oLineHeight: Fixed ): OSStatus; external name '_TXNGetLineMetrics';
4338 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4339 
4340 
4341 {������������������������������������������������������������������������������������������������������}
4342 {  � Count Changes                                                                                     }
4343 {������������������������������������������������������������������������������������������������������}
4344 
4345 {
4346  *  TXNGetChangeCount()
4347  *
4348  *  Summary:
4349  *    Retrieve number of times document has been changed.
4350  *
4351  *  Discussion:
4352  *    That is for every committed command (keydown, cut, copy) the
4353  *    value returned is count of those. This is useful for deciding if
4354  *    the Save item in the File menu should be active.
4355  *
4356  *  Mac OS X threading:
4357  *    Not thread safe
4358  *
4359  *  Parameters:
4360  *
4361  *    iTXNObject:
4362  *      Opaque TXNObject obtained from TXNCreateObject.
4363  *
4364  *  Result:
4365  *    ItemCount: count of changes.  This is total changes since
4366  *    document  was created or last saved.  Not count since this
4367  *    routine was last called or anything like that.
4368  *
4369  *  Availability:
4370  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4371  *    CarbonLib:        in CarbonLib 1.0 and later
4372  *    Non-Carbon CFM:   in Textension 1.0 and later
4373  }
TXNGetChangeCountnull4374 function TXNGetChangeCount( iTXNObject: TXNObject ): ItemCount; external name '_TXNGetChangeCount';
4375 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4376 
4377 
4378 {
4379  *  TXNGetCountForActionType()
4380  *
4381  *  Summary:
4382  *    Retrieves the number of times a given kind of action has
4383  *    occurred. There are three MLTE defined counts:
4384  *    kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges and
4385  *    kTXNActionCountOfAllChanges. In addition, this API can retrieve
4386  *    the number of times a custom action has occurred. See
4387  *    TXNBeginActionGroup for how to define a custom action group.
4388  *
4389  *  Discussion:
4390  *    Call TXNClearCountForActionType to reset the counters.
4391  *
4392  *  Mac OS X threading:
4393  *    Not thread safe
4394  *
4395  *  Parameters:
4396  *
4397  *    iTXNObject:
4398  *      Opaque TXNObject obtained from TXNCreateObject.
4399  *
4400  *    iActionTypeName:
4401  *      Specifies the kind of action changes to be included when
4402  *      retrieving the count. The value can be
4403  *      kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges,
4404  *      kTXNActionCountforAllChanges, or a string passed to
4405  *      TXNBeginActionGroup
4406  *
4407  *    oCount:
4408  *      The number of times the iActionGroupName action has occurred.
4409  *
4410  *  Result:
4411  *    An operating system status code.
4412  *
4413  *  Availability:
4414  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
4415  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
4416  *    Non-Carbon CFM:   not available
4417  }
TXNGetCountForActionTypenull4418 function TXNGetCountForActionType( iTXNObject: TXNObject; iActionTypeName: CFStringRef; var oCount: ItemCount ): OSStatus; external name '_TXNGetCountForActionType';
4419 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
4420 
4421 
4422 {
4423  *  TXNClearCountForActionType()
4424  *
4425  *  Summary:
4426  *    Reset the counter(s) for the specified kind of action(s) to zero.
4427  *
4428  *  Discussion:
4429  *    Use kTXNActionCountOfAllChanges to reset all counters.
4430  *
4431  *  Mac OS X threading:
4432  *    Not thread safe
4433  *
4434  *  Parameters:
4435  *
4436  *    iTXNObject:
4437  *      Opaque TXNObject obtained from TXNCreateObject.
4438  *
4439  *    iActionTypeName:
4440  *      Specifies the kind of action changes for which the counter
4441  *      should be set to zero. The value can be
4442  *      kTXNActionCountOfTextChanges, kTXNActionCountOfStyleChanges,
4443  *      kTXNActionCountforAllChanges or any string used to form an
4444  *      action group with TXNBeginActionGroup.
4445  *
4446  *  Result:
4447  *    An operating system status code.
4448  *
4449  *  Availability:
4450  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
4451  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
4452  *    Non-Carbon CFM:   not available
4453  }
TXNClearCountForActionTypenull4454 function TXNClearCountForActionType( iTXNObject: TXNObject; iActionTypeName: CFStringRef ): OSStatus; external name '_TXNClearCountForActionType';
4455 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
4456 
4457 
4458 {������������������������������������������������������������������������������������������������������}
4459 {  � Set/Get Object Bounds                                                                             }
4460 {������������������������������������������������������������������������������������������������������}
4461 
4462 {
4463  *  TXNSetHIRectBounds()
4464  *
4465  *  Summary:
4466  *    Sets the text object's view, the destination rectangles or both.
4467  *
4468  *  Discussion:
4469  *    Either of the input rectangle can be NULL. HIRect provides an
4470  *    uniform interface to the HIView coordinate system.
4471  *
4472  *  Mac OS X threading:
4473  *    Not thread safe
4474  *
4475  *  Parameters:
4476  *
4477  *    iTXNObject:
4478  *      Opaque TXNObject obtained from TXNCreateObject.  The bounds for
4479  *      this text object will be set.
4480  *
4481  *    iViewRect:
4482  *      A pointer to a HIRect data structure that contains the new
4483  *      coordinates for the view rectangle. Pass NULL if you don�t want
4484  *      to change the view rectangle.
4485  *
4486  *    iDestinationRect:
4487  *      A pointer to a HIRect data structure that contains the new
4488  *      coordinates for the destination rectangle. Pass NULL if you
4489  *      don�t want to change the destination rectangle.
4490  *
4491  *    iUpdate:
4492  *      Pass true if you want the location of the text and scrollbars
4493  *      to be recalculated and redrawn, otherwise pass false.
4494  *
4495  *  Availability:
4496  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
4497  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
4498  *    Non-Carbon CFM:   not available
4499  }
4500 procedure TXNSetHIRectBounds( iTXNObject: TXNObject; {const} iViewRect: HIRectPtr; {const} iDestinationRect: HIRectPtr; iUpdate: Boolean ); external name '_TXNSetHIRectBounds';
4501 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4502 
4503 
4504 {
4505  *  TXNGetHIRect()
4506  *
4507  *  Summary:
4508  *    Gets one of the text object's bounds based on the specified
4509  *    TXNRectKey
4510  *
4511  *  Mac OS X threading:
4512  *    Not thread safe
4513  *
4514  *  Parameters:
4515  *
4516  *    iTXNObject:
4517  *      Opaque TXNObject obtained from TXNCreateObject. The specified
4518  *      bounds for this text object will be returned.
4519  *
4520  *    iTXNRectKey:
4521  *      The value for the type of rectangle you want the function to
4522  *      return.
4523  *
4524  *    oRectangle:
4525  *      On return, a pointer to the HIRect data structure that contains
4526  *      the coordinates for the requested rectangle. If a rect is not
4527  *      defined, a pointer to an empty rect will be returned. Note that
4528  *      only scrollbar rectangle may be undefined for the text object.
4529  *
4530  *  Result:
4531  *    A result code indicating success or failure.
4532  *
4533  *  Availability:
4534  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
4535  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
4536  *    Non-Carbon CFM:   not available
4537  }
TXNGetHIRectnull4538 function TXNGetHIRect( iTXNObject: TXNObject; iTXNRectKey: TXNRectKey; var oRectangle: HIRect ): OSStatus; external name '_TXNGetHIRect';
4539 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4540 
4541 
4542 {
4543  *  TXNResizeFrame()
4544  *
4545  *  Summary:
4546  *    Changes the frame's size to match the new width and height.
4547  *
4548  *  Mac OS X threading:
4549  *    Not thread safe
4550  *
4551  *  Parameters:
4552  *
4553  *    iTXNObject:
4554  *      Opaque TXNObject obtained from TXNCreateObject.
4555  *
4556  *    iWidth:
4557  *      New width in pixels.
4558  *
4559  *    iHeight:
4560  *      New height in pixels.
4561  *
4562  *    iTXNFrameID:
4563  *      Deprecated. Pass 0.
4564  *
4565  *  Availability:
4566  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4567  *    CarbonLib:        in CarbonLib 1.0 and later
4568  *    Non-Carbon CFM:   in Textension 1.0 and later
4569  }
4570 procedure TXNResizeFrame( iTXNObject: TXNObject; iWidth: UInt32; iHeight: UInt32; iTXNFrameID: TXNFrameID ); external name '_TXNResizeFrame';
4571 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4572 
4573 
4574 {
4575  *  TXNSetFrameBounds()
4576  *
4577  *  Summary:
4578  *    Changes the frame's bounds to match the Rect.
4579  *
4580  *  Mac OS X threading:
4581  *    Not thread safe
4582  *
4583  *  Parameters:
4584  *
4585  *    iTXNObject:
4586  *      Opaque TXNObject obtained from TXNCreateObject.
4587  *
4588  *    iTop:
4589  *      Top of the bounds.
4590  *
4591  *    iLeft:
4592  *      Left of the bounds.
4593  *
4594  *    iBottom:
4595  *      Bottom of the bounds.
4596  *
4597  *    iRight:
4598  *      Right of the bounds.
4599  *
4600  *    iTXNFrameID:
4601  *      Deprecated. Pass 0.
4602  *
4603  *  Availability:
4604  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4605  *    CarbonLib:        in CarbonLib 1.0 and later
4606  *    Non-Carbon CFM:   in Textension 1.0 and later
4607  }
4608 procedure TXNSetFrameBounds( iTXNObject: TXNObject; iTop: SInt32; iLeft: SInt32; iBottom: SInt32; iRight: SInt32; iTXNFrameID: TXNFrameID ); external name '_TXNSetFrameBounds';
4609 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4610 
4611 
4612 {
4613  *  TXNGetViewRect()
4614  *
4615  *  Summary:
4616  *    Get the rectangle describing the current view into the document.
4617  *    The coordinates of this rectangle will be local to the the window.
4618  *
4619  *  Mac OS X threading:
4620  *    Not thread safe
4621  *
4622  *  Parameters:
4623  *
4624  *    iTXNObject:
4625  *      Opaque TXNObject obtained from TXNCreateObject.
4626  *
4627  *    oViewRect:
4628  *      The requested view rectangle.
4629  *
4630  *  Availability:
4631  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4632  *    CarbonLib:        in CarbonLib 1.0 and later
4633  *    Non-Carbon CFM:   in Textension 1.0 and later
4634  }
4635 procedure TXNGetViewRect( iTXNObject: TXNObject; var oViewRect: Rect ); external name '_TXNGetViewRect';
4636 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4637 
4638 
4639 {������������������������������������������������������������������������������������������������������}
4640 {  � Layout Calculation                                                                                }
4641 {������������������������������������������������������������������������������������������������������}
4642 
4643 {
4644  *  TXNRecalcTextLayout()
4645  *
4646  *  Summary:
4647  *    Recalculates the text layout based on the new View and
4648  *    Destination rectangles.
4649  *
4650  *  Discussion:
4651  *    Call this if you called TXNSetRectBounds with the iUpdate
4652  *    parameter set to false. It will also recalcuate where the
4653  *    scrollbars, if any, should be placed. Finally an update event
4654  *    will be generated so that the TXNObject is redrawn.
4655  *
4656  *  Mac OS X threading:
4657  *    Not thread safe
4658  *
4659  *  Parameters:
4660  *
4661  *    iTXNObject:
4662  *      Opaque TXNObject obtained from TXNCreateObject.
4663  *
4664  *  Availability:
4665  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only]
4666  *    CarbonLib:        in CarbonLib 1.5 and later
4667  *    Non-Carbon CFM:   not available
4668  }
4669 procedure TXNRecalcTextLayout( iTXNObject: TXNObject ); external name '_TXNRecalcTextLayout';
4670 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER *)
4671 
4672 
4673 {������������������������������������������������������������������������������������������������������}
4674 {  � Scrolling                                                                                         }
4675 {������������������������������������������������������������������������������������������������������}
4676 
4677 {
4678  *  TXNScroll()
4679  *
4680  *  Discussion:
4681  *    TXNScroll scrolls the text within a view rectangle of the
4682  *    specified object by the designated number of units.  For example,
4683  *    you might want to scroll the text in an object in response to
4684  *    user input in a control other than the standard scrollbars that
4685  *    MLTE supplies.
4686  *
4687  *  Mac OS X threading:
4688  *    Not thread safe
4689  *
4690  *  Parameters:
4691  *
4692  *    iTXNObject:
4693  *      Opaque TXNObject obtained from TXNCreateObject.
4694  *
4695  *    iVerticalScrollUnit:
4696  *      Specifies what units the values in ioVerticalDelta are in.  If
4697  *      iVerticalScrollUnit is equal to kTXNScrollUnitsInPixels the
4698  *      value is treated as pixels.  If the value is
4699  *      kTXNScrollUnitsInLines the value is treated as a count of
4700  *      lines. Note that using this value is the slowest because each
4701  *      line must be measured before it scrolls.  Finally if
4702  *      kTXNScrollUnitsInViewRects the value is treated as the height
4703  *      of the current viewRect.
4704  *
4705  *    iHorizontalScrollUnit:
4706  *      Specifies what units the values in iDh are in.  If
4707  *      iHorizontalScrollUnit is equal to kTXNScrollUnitsInPixels the
4708  *      value is treated as pixels.  If the value is
4709  *      kTXNScrollUnitsInLines the value is treated as a count of
4710  *      lines. Note that using this value for horizontal scrolling
4711  *      means that 16 pixels will be used to represent a line.  Finally
4712  *      if kTXNScrollUnitsInViewRects the value is treated as the width
4713  *      of the current viewRect.
4714  *
4715  *    ioVerticalDelta:
4716  *      The vertical amount to scroll.  The values in ioVerticalDelta
4717  *      can be treated as pixels, lines or viewrects.  See the
4718  *      discussion of the TXNScrollUnit parameters for more information
4719  *      for this.  On return this will contain the number of pixels
4720  *      actually scrolled in the vertical direction. A positive value
4721  *      moves the text down.
4722  *
4723  *    ioHorizontalDelta:
4724  *      The horizontal amount to scroll. The values in
4725  *      ioHorizontalDelta can specify a scroll amount that is pixels,
4726  *      lines or view rects.  Set TXNScrollUnit discussion for more
4727  *      information. On return this will contain the number of pixels
4728  *      actually scrolled in the horizontal direction. A positive value
4729  *      moves the text to the right.
4730  *
4731  *  Availability:
4732  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
4733  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4734  *    Non-Carbon CFM:   in Textension not yet available
4735  }
TXNScrollnull4736 function TXNScroll( iTXNObject: TXNObject; iVerticalScrollUnit: TXNScrollUnit; iHorizontalScrollUnit: TXNScrollUnit; var ioVerticalDelta: SIGNEDLONG; var ioHorizontalDelta: SIGNEDLONG ): OSStatus; external name '_TXNScroll';
4737 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4738 
4739 
4740 {
4741  *  TXNRegisterScrollInfoProc()
4742  *
4743  *  Discussion:
4744  *    If your application is drawing and handling its own scrolling
4745  *    widgets use this function to register a TXNScrollInfoUPP.  If you
4746  *    register a TXNScrollInfoUPP it will be called every time MLTE
4747  *    would normally update the values and maximum values of an MLTE
4748  *    scrollbar. For example when the user types the return key to add
4749  *    a new line at the end of their text MLTE will calculate a new
4750  *    maximum value.  If you have registered a TXNScrollInfoUPP it will
4751  *    be called with this nex maximum value. To turn off the callbacks
4752  *    call TXNRegisterScrollInfoProc with a value of NULL for the
4753  *    iTXNScrollInfoUPP.
4754  *
4755  *  Mac OS X threading:
4756  *    Not thread safe
4757  *
4758  *  Parameters:
4759  *
4760  *    iTXNObject:
4761  *      Opaque TXNObject obtained from TXNCreateObject.
4762  *
4763  *    iTXNScrollInfoUPP:
4764  *      A universal procedure pointer.
4765  *
4766  *    iRefCon:
4767  *      A refcon that is passed to the callback.
4768  *
4769  *  Availability:
4770  *    Mac OS X:         in version 10.2 and later in Carbon.framework [32-bit only]
4771  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
4772  *    Non-Carbon CFM:   in Textension not yet available
4773  }
4774 procedure TXNRegisterScrollInfoProc( iTXNObject: TXNObject; iTXNScrollInfoUPP: TXNScrollInfoUPP; iRefCon: SRefCon ); external name '_TXNRegisterScrollInfoProc';
4775 (* AVAILABLE_MAC_OS_X_VERSION_10_2_AND_LATER *)
4776 
4777 
4778 {
4779  *  TXNSetScrollbarState()
4780  *
4781  *  Summary:
4782  *    Sets the state of the scrollbars
4783  *
4784  *  Discussion:
4785  *    This replaces TXNActivate, which was confusing to many
4786  *    developers, since it only activates/inactivates the scrollbar.
4787  *    This is useful for activating scrollbar(s) even when the object
4788  *    does not have focus.
4789  *
4790  *  Mac OS X threading:
4791  *    Not thread safe
4792  *
4793  *  Parameters:
4794  *
4795  *    iTXNObject:
4796  *      Opaque TXNObject obtained from TXNCreateObject.
4797  *
4798  *    iActiveState:
4799  *      Boolean: if true, scrollbars will be active even if the object
4800  *      does not have the keyboard focus.  If false, scrollbars are
4801  *      synched with active state
4802  *
4803  *  Result:
4804  *    A result code indicating success or failure.
4805  *
4806  *  Availability:
4807  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
4808  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
4809  *    Non-Carbon CFM:   not available
4810  }
TXNSetScrollbarStatenull4811 function TXNSetScrollbarState( iTXNObject: TXNObject; iActiveState: TXNScrollBarState ): OSStatus; external name '_TXNSetScrollbarState';
4812 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4813 
4814 
4815 {������������������������������������������������������������������������������������������������������}
4816 {  � Offset/Point Conversion                                                                           }
4817 {������������������������������������������������������������������������������������������������������}
4818 
4819 {
4820  *  TXNHIPointToOffset()
4821  *
4822  *  Summary:
4823  *    Gets the coordinates of the point that corresponds to a specified
4824  *    offset in a text object.
4825  *
4826  *  Discussion:
4827  *    The coordinates of the point are in the coordinate system of the
4828  *    window or view owning the text object.  Note that the owner of
4829  *    the a text object is a view only in the case when the object is
4830  *    in a HITextView.
4831  *
4832  *  Mac OS X threading:
4833  *    Not thread safe
4834  *
4835  *  Parameters:
4836  *
4837  *    iTXNObject:
4838  *      Opaque TXNObject obtained from TXNCreateObject. The text object
4839  *      for which you want to obtain an offset value.
4840  *
4841  *    iHIPoint:
4842  *      A pointer to an HIPoint.
4843  *
4844  *    oOffset:
4845  *      On return, a pointer to the offset that corresponds to the
4846  *      value of the iHIPoint parameter.
4847  *
4848  *  Result:
4849  *    A result code indicating success or failure.
4850  *
4851  *  Availability:
4852  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
4853  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
4854  *    Non-Carbon CFM:   not available
4855  }
TXNHIPointToOffsetnull4856 function TXNHIPointToOffset( iTXNObject: TXNObject; const (*var*) iHIPoint: HIPoint; var oOffset: TXNOffset ): OSStatus; external name '_TXNHIPointToOffset';
4857 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4858 
4859 
4860 {
4861  *  TXNOffsetToHIPoint()
4862  *
4863  *  Summary:
4864  *    Gets the coordinates of the point that corresponds to a specified
4865  *    offset in a text object.
4866  *
4867  *  Discussion:
4868  *    The coordinates of the point are in the coordinate system of the
4869  *    window or view owning the text object.  Note that the owner of
4870  *    the a text object is a view only in the case when the object is
4871  *    in a HITextView.
4872  *
4873  *  Mac OS X threading:
4874  *    Not thread safe
4875  *
4876  *  Parameters:
4877  *
4878  *    iTXNObject:
4879  *      Opaque TXNObject obtained from TXNCreateObject. The text object
4880  *      for which you want to obtain the coordinates of a point.
4881  *
4882  *    iOffset:
4883  *      A text offset value.
4884  *
4885  *    oHIPoint:
4886  *      On return, a pointer to the point that corresponds to the value
4887  *      of the iOffset parameter.
4888  *
4889  *  Result:
4890  *    A result code indicating success or failure.
4891  *
4892  *  Availability:
4893  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only]
4894  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
4895  *    Non-Carbon CFM:   not available
4896  }
TXNOffsetToHIPointnull4897 function TXNOffsetToHIPoint( iTXNObject: TXNObject; iOffset: TXNOffset; var oHIPoint: HIPoint ): OSStatus; external name '_TXNOffsetToHIPoint';
4898 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
4899 
4900 
4901 {������������������������������������������������������������������������������������������������������}
4902 {  � Drag and Drop                                                                                     }
4903 {������������������������������������������������������������������������������������������������������}
4904 
4905 {
4906  *  TXNDragTracker()
4907  *
4908  *  Summary:
4909  *    If you ask that Drag handling procs not be installed.  Call this
4910  *    when your drag tracker is called and you want Textension to take
4911  *    over.
4912  *
4913  *  Mac OS X threading:
4914  *    Not thread safe
4915  *
4916  *  Parameters:
4917  *
4918  *    iTXNObject:
4919  *      Opaque TXNObject obtained from TXNNewObject.
4920  *
4921  *    iTXNFrameID:
4922  *      Deprecated. Pass 0.
4923  *
4924  *    iMessage:
4925  *      Drag message obtained from Drag Manager.
4926  *
4927  *    iWindow:
4928  *      WindowRef obtained from Drag Manager.
4929  *
4930  *    iDragReference:
4931  *      DragReference obtained from Drag Manager.
4932  *
4933  *    iDifferentObjectSameWindow:
4934  *      Pass true if the drag is still in the same window that it
4935  *      started in. False if the drag has moved into a different window.
4936  *
4937  *  Result:
4938  *    A result code indicating success or failure.
4939  *
4940  *  Availability:
4941  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4942  *    CarbonLib:        in CarbonLib 1.0 and later
4943  *    Non-Carbon CFM:   in Textension 1.0 and later
4944  }
TXNDragTrackernull4945 function TXNDragTracker( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iMessage: DragTrackingMessage; iWindow: WindowRef; iDragReference: DragReference; iDifferentObjectSameWindow: Boolean ): OSErr; external name '_TXNDragTracker';
4946 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4947 
4948 
4949 {
4950  *  TXNDragReceiver()
4951  *
4952  *  Summary:
4953  *    If you ask that Drag handling procs not be installed.  Call this
4954  *    when your drag receiver is called and you want Textension to take
4955  *    over.
4956  *
4957  *  Mac OS X threading:
4958  *    Not thread safe
4959  *
4960  *  Parameters:
4961  *
4962  *    iTXNObject:
4963  *      Opaque TXNObject obtained from TXNNewObject.
4964  *
4965  *    iTXNFrameID:
4966  *      Deprecated. Pass 0.
4967  *
4968  *    iWindow:
4969  *      WindowRef obtained from Drag Manager.
4970  *
4971  *    iDragReference:
4972  *      DragReference obtained from Drag Manager.
4973  *
4974  *    iDifferentObjectSameWindow:
4975  *      Pass true if the drag is still in the same window that it
4976  *      started in. False if the drag has moved into a different window.
4977  *
4978  *  Result:
4979  *    A result code indicating success or failure.
4980  *
4981  *  Availability:
4982  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only]
4983  *    CarbonLib:        in CarbonLib 1.0 and later
4984  *    Non-Carbon CFM:   in Textension 1.0 and later
4985  }
TXNDragReceivernull4986 function TXNDragReceiver( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iWindow: WindowRef; iDragReference: DragReference; iDifferentObjectSameWindow: Boolean ): OSErr; external name '_TXNDragReceiver';
4987 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER *)
4988 
4989 
4990 {������������������������������������������������������������������������������������������������������}
4991 {  � Command Events and Spell Checking                                                                 }
4992 {������������������������������������������������������������������������������������������������������}
4993 
4994 {$endc} {not TARGET_CPU_64}
4995 
4996 
4997 {
4998  *  TXNCommandEventSupportOptions
4999  *
5000  *  Discussion:
5001  *    Use these constants to turn support for specific HICommands in a
5002  *    given MLTE object.
5003  }
5004 type
5005 	TXNCommandEventSupportOptions = OptionBits;
5006 const
5007 {
5008    * Setting this bit enables processing for these HICommands:
5009    * kHICommandUndo, kHICommandRedo, kHICommandCut, kHICommandCopy,
5010    * kHICommandPaste, kHICommandClear, kHICommandSelectAll.
5011    }
5012 	kTXNSupportEditCommandProcessing = 1 shl 0;
5013 
5014   {
5015    * Setting this bit turns support on for updating the the menu item
5016    * associated with the above edit commands. What that means is:
5017    *
5018    *
5019    * For Undo the undo item will be enabled if there are any undoable
5020    * actions in MLTE's command stack.  Additionally, if you have
5021    * installed an action key mapper proc that will be called to get the
5022    * appropriate string for the undo item.
5023    *
5024    * For Redo the Redo item is enabled if there are any redoable
5025    * actions and the action key mapper callback will be called if it is
5026    * installed.
5027    *
5028    * For Cut and Clear the item is enabled if a the current selection
5029    * is not empty.  If the selection is empty this is disabled.
5030    *
5031    *
5032    * For Paste the item is enabled if the clipboard is not empty.  It
5033    * is disabled if the clipboard is empty or contains data that MLTE
5034    * does not understand.
5035    * <BR> For Select All the item is always enabled.
5036    }
5037 	kTXNSupportEditCommandUpdating = 1 shl 1;
5038 
5039   {
5040    * Turns on support for spell checking.  The spell checking commands
5041    * supported are kHICommandShowSpellingPanel,
5042    * kHICommandCheckSpelling, kHICommandChangeSpelling,
5043    * kHICommandCheckSpellingAsYouType, kHICommandIgnoreSpelling, and
5044    * kHICommandLearnWord.
5045    }
5046 	kTXNSupportSpellCheckCommandProcessing = 1 shl 2;
5047 
5048   {
5049    * Turns on support for updating the menu item associated with a
5050    * given spell checking command.
5051    *
5052    * Show Spelling: This item is always enabled.
5053    *
5054    * Check Spelling: This item is always enabled.
5055    *
5056    * Change Spelling:  Typically this is not included in a spelling
5057    * menu.  If it is included it is enabled if the current selection is
5058    * a misspelled word.  It is disabled if the current selection is
5059    * empty or is not a misspelled word.
5060    *
5061    * Check Spelling as You Type:  This item is always enabled.  It is
5062    * checked if this feature has been enabled.  By default when you
5063    * turn on spell checking this is enabled. If this feature has been
5064    * disabled the item is unchecked.
5065    *
5066    * Ignore Spelling.  This is a command that usually does not have a
5067    * corresponding menu item.  If a menu does have this item it is
5068    * disabled if the current selection is empty or is not a misspelled
5069    * word.  It is enabled if the current selection is a misspelled
5070    * word.
5071    *
5072    * Learn Spelling.  Another command that typically does not have a
5073    * corresponding menu item.  It behaves exactly like the Ignore
5074    * spelling command.
5075    }
5076 	kTXNSupportSpellCheckCommandUpdating = 1 shl 3;
5077 
5078   {
5079    * Setting this bit to turn on Carbon Font Panel support. Once
5080    * support is turned on, MLTE handles the following Carbon Events
5081    * defined in FontPanel.h: � kHICommandShowHideFontPanel and
5082    * kEventFontPanelClosed to show and hide the Carbon font panel �
5083    * kEventFontSelection event to update the document after you select
5084    * a new font, size, style, color, or any features setting from the
5085    * Typography Panel.
5086    }
5087 	kTXNSupportFontCommandProcessing = 1 shl 4;
5088 
5089   {
5090    * Setting this bit to turn on support for updating the selection in
5091    * Carbon Font Panel when the current selection in MLTE document is
5092    * changed. When you set this bit, kTXNSupportFontCommandProcessing
5093    * has to be set also, which means that you only can get this support
5094    * if Carbon Font Panel support is on.
5095    }
5096 	kTXNSupportFontCommandUpdating = 1 shl 5;
5097 
5098 {$ifc not TARGET_CPU_64}
5099 {
5100  *  TXNSetCommandEventSupport()
5101  *
5102  *  Summary:
5103  *    Turn support for a variety of HICommands on or off in MLTE. See
5104  *    the documentation for the TXNCommandEventSupportOptions constants
5105  *    for the set of commands that are supported.
5106  *
5107  *  Discussion:
5108  *    This function enables support for a variety of commands.  It is
5109  *    important to know that the handlers are installed immediatedly
5110  *    when an MLTE object is associated with an HIObject that can serve
5111  *    as an event target ( via a call to TXNAttachObjectToWindow or
5112  *    TXNSetEventTarget ). However when the handlers are installed they
5113  *    are not enabled.  Calling TXNSetCommandEventSupport enables the
5114  *    commands. Using this approach means that an application can
5115  *    install handlers on top of these and be sure that enabling or
5116  *    disabling the MLTE handlers will not change the order of the
5117  *    handler chain.
5118  *
5119  *  Mac OS X threading:
5120  *    Not thread safe
5121  *
5122  *  Parameters:
5123  *
5124  *    iTXNObject:
5125  *      The TXNObject.
5126  *
5127  *    iOptions:
5128  *      Set this to enable/disable command support for selected Edit
5129  *      commands (kHICommandUndo, kHICommandRedo, kHICommandCut,
5130  *      kHICommandCopy, kHICommandPaste, kHICommandClear,
5131  *      kHICommandSelectAll) and/or support for spell checking commands.
5132  *
5133  *  Result:
5134  *    An OSStatus code.  noErr if the operation was successful.
5135  *
5136  *  Availability:
5137  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5138  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5139  *    Non-Carbon CFM:   not available
5140  }
TXNSetCommandEventSupportnull5141 function TXNSetCommandEventSupport( iTXNObject: TXNObject; iOptions: TXNCommandEventSupportOptions ): OSStatus; external name '_TXNSetCommandEventSupport';
5142 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5143 
5144 
5145 {
5146  *  TXNGetCommandEventSupport()
5147  *
5148  *  Summary:
5149  *    Returns the command event support that is currently set for an
5150  *    MLTE object.
5151  *
5152  *  Mac OS X threading:
5153  *    Not thread safe
5154  *
5155  *  Parameters:
5156  *
5157  *    iTXNObject:
5158  *      The TXNObject.
5159  *
5160  *    oOptions:
5161  *      A pointer to a TXNCommandEventSupportOptions. Contains the
5162  *      option settings or return.
5163  *
5164  *  Result:
5165  *    An OSStatus code.  noErr if the operation was successful.
5166  *
5167  *  Availability:
5168  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5169  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5170  *    Non-Carbon CFM:   not available
5171  }
TXNGetCommandEventSupportnull5172 function TXNGetCommandEventSupport( iTXNObject: TXNObject; var oOptions: TXNCommandEventSupportOptions ): OSStatus; external name '_TXNGetCommandEventSupport';
5173 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5174 
5175 
5176 {
5177  *  TXNSetSpellCheckAsYouType()
5178  *
5179  *  Summary:
5180  *    Call to turn on spell check as you type.  If spell checking as
5181  *    not been enabled via a call to TXNSetCommandEventSupport than an
5182  *    error is returned.
5183  *
5184  *  Mac OS X threading:
5185  *    Not thread safe
5186  *
5187  *  Parameters:
5188  *
5189  *    iTXNObject:
5190  *      The TXNObject.
5191  *
5192  *    iActivate:
5193  *      Turns "Spell Check as You Type" on if true.  Turns it off if
5194  *      false.
5195  *
5196  *  Result:
5197  *    An OSStatus code.  noErr if the operation was successful.
5198  *
5199  *  Availability:
5200  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5201  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5202  *    Non-Carbon CFM:   not available
5203  }
TXNSetSpellCheckAsYouTypenull5204 function TXNSetSpellCheckAsYouType( iTXNObject: TXNObject; iActivate: Boolean ): OSStatus; external name '_TXNSetSpellCheckAsYouType';
5205 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5206 
5207 
5208 {
5209  *  TXNGetSpellCheckAsYouType()
5210  *
5211  *  Summary:
5212  *    Call this function to determine if "Spell Check as You Type" is
5213  *    turned on or off.
5214  *
5215  *  Mac OS X threading:
5216  *    Not thread safe
5217  *
5218  *  Parameters:
5219  *
5220  *    iTXNObject:
5221  *      The TXNObject.
5222  *
5223  *  Result:
5224  *    A Boolean.  The value is true if Spell Check As You Type is on
5225  *    and false if not.  Additionally if Spell Checking is not enabled
5226  *    for the TXNObject then the result of this function will be false.
5227  *
5228  *  Availability:
5229  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5230  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5231  *    Non-Carbon CFM:   not available
5232  }
TXNGetSpellCheckAsYouTypenull5233 function TXNGetSpellCheckAsYouType( iTXNObject: TXNObject ): Boolean; external name '_TXNGetSpellCheckAsYouType';
5234 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5235 
5236 
5237 {
5238     Functions for controlling the current event target object.
5239 }
5240 {
5241  *  TXNSetEventTarget()
5242  *
5243  *  Summary:
5244  *    Specifies a Carbon Event target for MLTE Carbon Event Handlers.
5245  *
5246  *  Discussion:
5247  *    Call this function when you want to override or set the
5248  *    TXNObject's Carbon Event Target.  The default target for
5249  *    TXNObjects that are not contained in an HITextView is the
5250  *    TXNObject's window.  Note that if the TXNObject already has a
5251  *    default target when this function is called the handlers will be
5252  *    removed from the old target before install the new handlers that
5253  *    are listed below.
5254  *
5255  *    When this function returns handlers for the following Carbon
5256  *    Events are installed and are active:
5257  *
5258  *    For kEventClassTextInput:
5259  *     kEventTextInputUpdateActiveInputArea
5260  *     kEventTextInputUnicodeForKeyEvent
5261  *     kEventTextInputUnicodeText
5262  *    kEventTextInputOffsetToPos
5263  *    kEventTextInputPosToOffset
5264  *    kEventTextInputGetSelectedText
5265  *
5266  *    For kEventClassTSMDocumentAccess:
5267  *     kEventTSMDocumentAccessGetLength
5268  *     kEventTSMDocumentAccessGetSelectedRange
5269  *     kEventTSMDocumentAccessGetCharactersPtr
5270  *     kEventTSMDocumentAccessGetCharactersPtrForLargestBuffer
5271  *     kEventTSMDocumentAccessGetCharacters
5272  *     kEventTSMDocumentAccessGetFont
5273  *     kEventTSMDocumentAccessGetGlyphInfo
5274  *     kEventTSMDocumentAccessGetFirstRectForRange
5275  *
5276  *    For kEventClassFont:
5277  *    kEventFontPanelClosed
5278  *    kEventFontSelection
5279  *
5280  *    Additionally these handlers for kEventClassCommand are installed,
5281  *    but are inactive by default.
5282  *    kEventProcessCommand
5283  *    kEventCommandUpdateStatus
5284  *
5285  *    The kEventClassCommand handlers support the following commands:
5286  *
5287  *    kHICommandUndo
5288  *    kHICommandRedo
5289  *    kHICommandSelectAll
5290  *    kHICommandCut
5291  *    kHICommandCopy
5292  *    kHICommandPaste
5293  *    kHICommandClear
5294  *    kHICommandShowSpellingPanel
5295  *    kHICommandCheckSpelling
5296  *    kHICommandChangeSpelling
5297  *    kHICommandCheckSpellingAsYouType
5298  *    kHICommandIgnoreSpelling
5299  *    kHICommandLearnWord
5300  *
5301  *    Activate command support by calling TXNSetCommandEventSupport
5302  *    with the correct options.
5303  *
5304  *  Mac OS X threading:
5305  *    Not thread safe
5306  *
5307  *  Parameters:
5308  *
5309  *    iTXNObject:
5310  *      The TXNObject.
5311  *
5312  *    iEventTarget:
5313  *      An HIObjectRef.  The HIObject will become the event target for
5314  *      all of the TXNObject's Carbon Event handlers.
5315  *
5316  *  Result:
5317  *    An OSStatus code.  noErr if the operation was successful.
5318  *
5319  *  Availability:
5320  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5321  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5322  *    Non-Carbon CFM:   not available
5323  }
TXNSetEventTargetnull5324 function TXNSetEventTarget( iTXNObject: TXNObject; iEventTarget: HIObjectRef { can be NULL } ): OSStatus; external name '_TXNSetEventTarget';
5325 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5326 
5327 
5328 {
5329  *  TXNGetEventTarget()
5330  *
5331  *  Summary:
5332  *    Requests a TXNObject's current event target.
5333  *
5334  *  Discussion:
5335  *    This function is used to obtain the HIObjectRef which is the
5336  *    TXNObject's carbon event target. Callers can use this function to
5337  *    obtain the target and subsequently install their own handlers.
5338  *
5339  *  Mac OS X threading:
5340  *    Not thread safe
5341  *
5342  *  Parameters:
5343  *
5344  *    iTXNObject:
5345  *      The TXNObject.
5346  *
5347  *    oEventTarget:
5348  *      An HIObjectRef pointer.  The current Carbon Event target.
5349  *
5350  *  Result:
5351  *    An OSStatus code.  noErr if the operation was successful.
5352  *
5353  *  Availability:
5354  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5355  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5356  *    Non-Carbon CFM:   not available
5357  }
TXNGetEventTargetnull5358 function TXNGetEventTarget( iTXNObject: TXNObject; var oEventTarget: HIObjectRef ): OSStatus; external name '_TXNGetEventTarget';
5359 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5360 
5361 
5362 {
5363  *  TXNSetContextualMenuSetup()
5364  *
5365  *  Summary:
5366  *    Provides a callback function that is called before MLTE displays
5367  *    its contextual menu.
5368  *
5369  *  Discussion:
5370  *    The menuSetupProc is called immediately before MLTE displays its
5371  *    contextual menu.  The menu that is passed to the callback will
5372  *    only contain MLTE specific items.  The client items and handlers
5373  *    should be installed each time the callback is called.  When the
5374  *    callback is called MLTE will have selected the word that the user
5375  *    option-clicked on.  For convenience sake the TXNObject associated
5376  *    with the callback is passed to the callback as well as the user
5377  *    data.
5378  *
5379  *  Mac OS X threading:
5380  *    Not thread safe
5381  *
5382  *  Parameters:
5383  *
5384  *    iTXNObject:
5385  *      The TXNObject.
5386  *
5387  *    iMenuSetupProc:
5388  *      The callback.
5389  *
5390  *    iUserData:
5391  *      A pointer to some useful data.
5392  *
5393  *  Result:
5394  *    OStatus.  noErr is the operation is successful.
5395  *
5396  *  Availability:
5397  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5398  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5399  *    Non-Carbon CFM:   not available
5400  }
TXNSetContextualMenuSetupnull5401 function TXNSetContextualMenuSetup( iTXNObject: TXNObject; iMenuSetupProc: TXNContextualMenuSetupUPP; iUserData: {const} UnivPtr ): OSStatus; external name '_TXNSetContextualMenuSetup';
5402 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5403 
5404 
5405 {������������������������������������������������������������������������������������������������������}
5406 {  � Accessibility                                                                                     }
5407 {������������������������������������������������������������������������������������������������������}
5408 
5409 {
5410  *  TXNGetAccessibilityHIObject()
5411  *
5412  *  Summary:
5413  *    Return an HIObjectRef used to represent the MLTE object for
5414  *    accessibility.
5415  *
5416  *  Discussion:
5417  *    For each MLTE object a view creates, the view needs to call
5418  *    TXNGetAccessibilityHIObject to get an HIObjectRef that can be
5419  *    used to represent the MLTE object as an accessible
5420  *    object.
5421  *
5422  *    After the view gets this HIObjectRef, it must add the HIObjectRef
5423  *    as a child of itself.  The accessibility engine will then route
5424  *    events to MLTE accessible objects automatically.
5425  *
5426  *    The view must install Carbon event handlers for
5427  *    kEventAccessibleGetAllAttributeNames and
5428  *    kEventAccessibleGetNamedAttribute, using the HIObjectRef as the
5429  *    target, to provide information for at least the following
5430  *    required attributes:
5431  *
5432  *    kAXRoleAttribute
5433  *    kAXRoleDescriptionAttribute
5434  *    kAXWindowAttribute
5435  *    kAXTopUIElementAttribute
5436  *    kAXPositionAttribute
5437  *    kAXSizeAttribute
5438  *
5439  *    MLTE also installs handlers for
5440  *    kEventAccessibleGetAllAttributeNames and
5441  *    kEventAccessibleGetNamedAttribute.  These handlers return
5442  *    information for the following attributes.  Note that these
5443  *    handlers will not get called unless the client-installed handlers
5444  *    return eventNotHandledErr.
5445  *
5446  *    kAXEnabledAttribute
5447  *    kAXFocusedAttribute
5448  *    kAXValueAttribute
5449  *    kAXSelectedTextAttribute
5450  *    kAXSelectedTextRangeAttribute
5451  *     kAXNumberOfCharactersAttribute
5452  *
5453  *    kAXLineForIndexParameterizedAttribute
5454  *     kAXRangeForLineParameterizedAttribute
5455  *     kAXStringForRangeParameterizedAttribute
5456  *     kAXRangeForPositionParameterizedAttribute
5457  *     kAXRangeForIndexParameterizedAttribute
5458  *     kAXBoundsForRangeParameterizedAttribute
5459  *     kAXStyleRangeForIndexParameterizedAttribute
5460  *
5461  *  Mac OS X threading:
5462  *    Not thread safe
5463  *
5464  *  Parameters:
5465  *
5466  *    iTXNObject:
5467  *      Opaque TXNObject obtained from TXNCreateObject.
5468  *
5469  *    oHIObjectRef:
5470  *      An HIObjectRef which represents iTXNObject as an accessible
5471  *      object.
5472  *
5473  *  Result:
5474  *    An operating system status code.
5475  *
5476  *  Availability:
5477  *    Mac OS X:         in version 10.4 and later in Carbon.framework [32-bit only]
5478  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
5479  *    Non-Carbon CFM:   not available
5480  }
TXNGetAccessibilityHIObjectnull5481 function TXNGetAccessibilityHIObject( iTXNObject: TXNObject; var oHIObjectRef: HIObjectRef ): OSStatus; external name '_TXNGetAccessibilityHIObject';
5482 (* AVAILABLE_MAC_OS_X_VERSION_10_4_AND_LATER *)
5483 
5484 
5485 { **************************************************************************************************** }
5486 {������������������������������������������������������������������������������������������������������}
5487 {                                  �  DEPRECATED �                                                     }
5488 {������������������������������������������������������������������������������������������������������}
5489 { **************************************************************************************************** }
5490 
5491 {������������������������������������������������������������������������������������������������������}
5492 {  � DEPRECATED CONSTANTS                                                                              }
5493 {������������������������������������������������������������������������������������������������������}
5494 {$endc} {not TARGET_CPU_64}
5495 
5496 {$ifc not TARGET_CPU_64}
5497 {������������������������������������������������������������������������������������������������������}
5498 { Deprecated Font Menu support on Mac OS X version 10.5 and later, use Font Panel instead              }
5499 {������������������������������������������������������������������������������������������������������}
5500 type
5501 	TXNFontMenuObject = ^OpaqueTXNFontMenuObject; { an opaque type }
5502 	OpaqueTXNFontMenuObject = record end;
5503 	TXNFontMenuObjectPtr = ^TXNFontMenuObject;  { when a var xx:TXNFontMenuObject parameter can be nil, it is changed to xx: TXNFontMenuObjectPtr }
5504 {$ifc USE_CFSTR_CONSTANT_MACROS}
5505 {$definec kTXNFontMenuRefKey CFSTRP('FontMenuRef')}
5506 {$endc}
5507 {$ifc USE_CFSTR_CONSTANT_MACROS}
5508 {$definec kTXNFontMenuObjectKey CFSTRP('FontMenuObject')}
5509 {$endc}
5510 
5511 {������������������������������������������������������������������������������������������������������}
5512 { Deprecated Font / keyboard synchronization support constants on Mac OS X version 10.5 and later      }
5513 {������������������������������������������������������������������������������������������������������}
5514 const
5515 	kTXNKeyboardSyncStateTag = FourCharCode('kbsy');
5516 
5517 { kTXNKeyboardSyncStateTag}
5518 const
5519 	kTXNSyncKeyboard = false;
5520 	kTXNNoSyncKeyboard = true;
5521 
5522 const
5523 	kTXNNoKeyboardSyncBit = 6;
5524 
5525 const
5526 	kTXNNoKeyboardSyncMask = 1 shl kTXNNoKeyboardSyncBit;
5527 
5528 {$endc} {not TARGET_CPU_64}
5529 
5530 
5531 {
5532  *  TXTNTag
5533  *
5534  *  Summary:
5535  *    Deprecated. Use TXNTypeRunAttributes.
5536  }
5537 
5538 type
5539 	TXTNTag = FourCharCode;
5540 
5541 {
5542  *  TXNErrors
5543  *
5544  *  Summary:
5545  *    Deprecated. Use OSStatus.
5546  }
5547 type
5548 	TXNErrors = OSStatus;
5549 
5550 {
5551  *  TXNObjectRefcon
5552  *
5553  *  Summary:
5554  *    Deprecated. Only used by TXNNewObject API, which has been
5555  *    deprecated.
5556  }
5557 type
5558 	TXNObjectRefcon = UnivPtr;
5559 
5560 {
5561  *  TXNLongRect
5562  *
5563  *  Summary:
5564  *    Deprecated. Only used by TXNGetRectBounds/TXNSetRectBounds APIs,
5565  *    which have been deprecated.
5566  }
5567 type
5568 	TXNLongRectPtr = ^TXNLongRect;
5569 	TXNLongRect = record
5570 		top: SInt32;
5571 		left: SInt32;
5572 		bottom: SInt32;
5573 		right: SInt32;
5574 	end;
5575 
5576 {
5577  *  TXNFrameType
5578  *
5579  *  Summary:
5580  *    Deprecated.  Only used by TXNNewObject API, which has been
5581  *    deprecated. Only kTXNTextEditStyleFrameType is supported.
5582  }
5583 type
5584 	TXNFrameType = UInt32;
5585 const
5586 	kTXNTextEditStyleFrameType = 1;
5587 	kTXNPageFrameType = 2;    { Not supported}
5588 	kTXNMultipleFrameType = 3;     { Not supported}
5589 
5590 
5591 {  Deprecated all QD TXNTypeRunAttributes & TXNTypeRunAttributeSizes constants.}
5592 const
5593 	kTXNQDFontNameAttribute = FourCharCode('fntn');
5594 	kTXNQDFontFamilyIDAttribute = FourCharCode('font');
5595 	kTXNQDFontSizeAttribute = FourCharCode('size'); {the corresponding TXNTypeRunAttributeSizes is kTXNFontSizeAttributeSize}
5596 	kTXNQDFontStyleAttribute = FourCharCode('face');
5597 	kTXNQDFontColorAttribute = FourCharCode('klor');
5598 
5599 const
5600 	kTXNQDFontNameAttributeSize = SizeOf(Str255);
5601 	kTXNQDFontFamilyIDAttributeSize = SizeOf(SInt16);
5602 	kTXNFontSizeAttributeSize = SizeOf(Fixed);
5603 	kTXNQDFontSizeAttributeSize = SizeOf(SInt16);
5604 	kTXNQDFontStyleAttributeSize = SizeOf(Style);
5605 	kTXNQDFontColorAttributeSize = SizeOf(RGBColor);
5606 
5607 {
5608     Deprecated QuickDraw imaging constants.
5609     On Mac OS X version 10.4 and later, MLTE always uses Quartz imaging.
5610 }
5611 
5612 const
5613 	kTXNUseQDforImagingBit = 16;
5614 
5615 const
5616 	kTXNUseQDforImagingMask = 1 shl kTXNUseQDforImagingBit;
5617 
5618 const
5619 	kTXNImageWithQDBit = 8;
5620 
5621 const
5622 	kTXNImageWithQDMask = 1 shl kTXNImageWithQDBit;
5623 
5624 
5625 {
5626     Deprecated TXNControlTag constant.
5627     On Mac OS X version 10.4 and later, MLTE never draws the caret when inactive.
5628 }
5629 
5630 const
5631 	kTXNDrawCaretWhenInactiveTag = FourCharCode('dcrt'); { Caret will never be drawn when inactive.}
5632 
5633 const
5634 	kTXNDontDrawCaretWhenInactive = false;
5635 	kTXNDrawCaretWhenInactive = true;
5636 
5637 const
5638 	kTXNDontDrawCaretWhenInactiveBit = 12;
5639 
5640 const
5641 	kTXNDontDrawCaretWhenInactiveMask = 1 shl kTXNDontDrawCaretWhenInactiveBit;
5642 
5643 
5644 {
5645     Deprecated TSM constants.
5646     On Mac OS X, MLTE uses the Text Services Manager.
5647 }
5648 
5649 const
5650 	kTXNNoTSMEverBit = 4;
5651 
5652 const
5653 	kTXNNoTSMEverMask = 1 shl kTXNNoTSMEverBit;
5654 
5655 
5656 {
5657     Deprecated TXNCarbonEventInfo flag constants.
5658     MLTE does not support AppleEvents on Mac OS X version 10.1 and later.
5659 }
5660 
5661 const
5662 	kTXNNoAppleEventHandlersBit = 0;
5663 	kTXNRestartAppleEventHandlersBit = 1;
5664 
5665 const
5666 	kTXNNoAppleEventHandlersMask = 1 shl kTXNNoAppleEventHandlersBit;
5667 	kTXNRestartAppleEventHandlersMask = 1 shl kTXNRestartAppleEventHandlersBit;
5668 
5669 
5670 {
5671  *  TXNActionKey
5672  *
5673  }
5674 type
5675 	TXNActionKeyPtr = ^TXNActionKey; { when a VAR xx: TXNActionKey parameter can be nil, it is changed to xx: TXNActionKeyPtr }
5676 	TXNActionKey = UInt32;
5677 const
5678 	kTXNTypingAction = 0;
5679 	kTXNCutAction = 1;
5680 	kTXNPasteAction = 2;
5681 	kTXNClearAction = 3;
5682 	kTXNChangeFontAction = 4;
5683 	kTXNChangeFontColorAction = 5;
5684 	kTXNChangeFontSizeAction = 6;
5685 	kTXNChangeStyleAction = 7;
5686 	kTXNAlignLeftAction = 8;
5687 	kTXNAlignCenterAction = 9;
5688 	kTXNAlignRightAction = 10;
5689 	kTXNDropAction = 11;
5690 	kTXNMoveAction = 12;
5691 	kTXNFontFeatureAction = 13;
5692 	kTXNFontVariationAction = 14;
5693 
5694   {
5695    * Use if none of the above apply.
5696    }
5697 	kTXNUndoLastAction = 1024;
5698 
5699 { Deprecated on Mac OS X version 10.4 and later, use kTXNActionNameMapperKey instead.}
5700 {$ifc USE_CFSTR_CONSTANT_MACROS}
5701 {$definec kTXNActionKeyMapperKey CFSTRP('ActionKeyMapper')}
5702 {$endc}
5703 
5704 { Deprecated on Mac OS X version 10.4 and later, use TXNActionNameMapperProcPtr instead.}
5705 type
actionKeynull5706 	TXNActionKeyMapperProcPtr = function( actionKey: TXNActionKey; commandID: UInt32 ): CFStringRef;
5707 type
5708 	TXNActionKeyMapperUPP = TXNActionKeyMapperProcPtr;
5709 {
5710  *  NewTXNActionKeyMapperUPP()
5711  *
5712  *  Availability:
5713  *    Mac OS X:         in version 10.0 and later in Carbon.framework
5714  *    CarbonLib:        in CarbonLib 1.3 and later
5715  *    Non-Carbon CFM:   available as macro/inline
5716  }
NewTXNActionKeyMapperUPPnull5717 function NewTXNActionKeyMapperUPP( userRoutine: TXNActionKeyMapperProcPtr ): TXNActionKeyMapperUPP; external name '_NewTXNActionKeyMapperUPP';
5718 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
5719 
5720 {
5721  *  DisposeTXNActionKeyMapperUPP()
5722  *
5723  *  Availability:
5724  *    Mac OS X:         in version 10.0 and later in Carbon.framework
5725  *    CarbonLib:        in CarbonLib 1.3 and later
5726  *    Non-Carbon CFM:   available as macro/inline
5727  }
5728 procedure DisposeTXNActionKeyMapperUPP( userUPP: TXNActionKeyMapperUPP ); external name '_DisposeTXNActionKeyMapperUPP';
5729 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
5730 
5731 {
5732  *  InvokeTXNActionKeyMapperUPP()
5733  *
5734  *  Availability:
5735  *    Mac OS X:         in version 10.0 and later in Carbon.framework
5736  *    CarbonLib:        in CarbonLib 1.3 and later
5737  *    Non-Carbon CFM:   available as macro/inline
5738  }
InvokeTXNActionKeyMapperUPPnull5739 function InvokeTXNActionKeyMapperUPP( actionKey: TXNActionKey; commandID: UInt32; userUPP: TXNActionKeyMapperUPP ): CFStringRef; external name '_InvokeTXNActionKeyMapperUPP';
5740 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
5741 
5742 {������������������������������������������������������������������������������������������������������}
5743 {  � Count Option Bits                                                                                 }
5744 {������������������������������������������������������������������������������������������������������}
5745 {  Options for TXNGet/ClearActionChangeCount to decide what type(s) of action count to use.            }
5746 
5747 const
5748 	kTXNTextInputCountBit = 0;
5749 	kTXNRunCountBit = 1;
5750 
5751 
5752 {
5753  *  TXNCountOptions
5754  *
5755  }
5756 type
5757 	TXNCountOptions = OptionBits;
5758 const
5759 	kTXNTextInputCountMask = 1 shl kTXNTextInputCountBit;
5760 	kTXNRunCountMask = 1 shl kTXNRunCountBit;
5761 	kTXNAllCountMask = kTXNTextInputCountMask or kTXNRunCountMask;
5762 
5763 
5764 {������������������������������������������������������������������������������������������������������}
5765 {  � DEPRECATED APIs,  Mac OS X version 10.2 and later                                                 }
5766 {������������������������������������������������������������������������������������������������������}
5767 
5768 {$ifc not TARGET_CPU_64}
5769 {
5770  *  TXNSetViewRect()   *** DEPRECATED ***
5771  *
5772  *  Deprecated:
5773  *    Use TXNSetFrameBounds or TXNSetRectBounds APIs instead.
5774  *
5775  *  Discussion:
5776  *    Set the rectangle describing the current view into the document.
5777  *    This will change how much text is viewable.  Not where a line of
5778  *    text wraps. That is controlled by TXNSetFrameBoundsSize.
5779  *
5780  *  Mac OS X threading:
5781  *    Not thread safe
5782  *
5783  *  Parameters:
5784  *
5785  *    iTXNObject:
5786  *      Opaque TXNObject obtained from TXNCreateObject.
5787  *
5788  *    iViewRect:
5789  *      Rect of the view.
5790  *
5791  *  Availability:
5792  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.2
5793  *    CarbonLib:        in CarbonLib 1.3 and later
5794  *    Non-Carbon CFM:   in Textension 1.3 and later
5795  }
5796 procedure TXNSetViewRect( iTXNObject: TXNObject; const (*var*) iViewRect: Rect ); external name '_TXNSetViewRect';
5797 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_2 *)
5798 
5799 
5800 {������������������������������������������������������������������������������������������������������}
5801 {  � DEPRECATED APIs, Mac OS X version 10.3 and later                                                  }
5802 {������������������������������������������������������������������������������������������������������}
5803 {
5804  *  TXNNewObject()   *** DEPRECATED ***
5805  *
5806  *  Deprecated:
5807  *    Use TXNCreateObject API instead.
5808  *
5809  *  Discussion:
5810  *    Allocates a new frame (i.e. new is called to allocate a
5811  *    TXNObject) and returns a pointer to the object in the newDoc
5812  *    parameter.
5813  *
5814  *  Mac OS X threading:
5815  *    Not thread safe
5816  *
5817  *  Parameters:
5818  *
5819  *    iFileSpec:
5820  *      If NULL you start with an empty document.  If not NULL, the
5821  *      file is read to obtain the document contents  after the object
5822  *      is successfully allocated.
5823  *
5824  *    iWindow:
5825  *      Required.  The window in which the document is going to be
5826  *      displayed.  If a fileSpec is provided during creation, the
5827  *      filename is going to be used as the window title.  If iWindow
5828  *      is NULL, TXNAttachObjectToWindow needs to be called after
5829  *      creation.
5830  *
5831  *    iFrame:
5832  *      If text-area does not fill the entire window.  This specifies
5833  *      the area to fill.  Can be NULL. In  which case, the window�s
5834  *      portRect is used as the frame.
5835  *
5836  *    iFrameOptions:
5837  *      Specify the options to be supported by this frame.  The
5838  *      available options are support for cutting and pasting  movies
5839  *      and sound, handle scrollbars and handle grow box in  the frame.
5840  *
5841  *    iFrameType:
5842  *      Specify the type of frame to be used.  In MLTE version 1.1 and
5843  *      earlier, only kTXNTextEditStyleFrameType is supported.
5844  *
5845  *    iFileType:
5846  *      Specify the primary file type.  If you  use
5847  *      kTextensionTextFile files will be saved in a private format
5848  *      (see xxx).  If you  want saved files to be plain text files you
5849  *      should specify 'TEXT' here. If you specify 'TEXT' here you can
5850  *      use the frameOptions parameter to specify  whether the TEXT
5851  *      files should be saved  with 'MPSR' resources or 'styl'
5852  *      resources. These are resources which contain style information
5853  *      for a  file, and they  both have there own limitations.  If you
5854  *      use 'styl' resources to save style info your documents can have
5855  *      as many styles as you like however tabs will not be saved.  If
5856  *      you use 'MPSR' resources only the first style in the document
5857  *      will be saved (you as client are expected to apply all style
5858  *      changes to the entire document).  If you  truly want  rich
5859  *      documents which can potentially contain graphics and sound you
5860  *      should specify kTextensionTextFileOutput.  If you want a plain
5861  *      text editor like SimpleText specify that style information by
5862  *      saved via �styl� resources. If you want files similar to those
5863  *      output by CW IDE, BBEdit, and MPW specify that style
5864  *      information be saved in a �MPSR� resource.
5865  *
5866  *    iPermanentEncoding:
5867  *      The encoding in which the document should be saved (Unicode,
5868  *      Text or System default).
5869  *
5870  *    oTXNObject:
5871  *      Pointer to the opaque datastructure allocated by the function.
5872  *      Most of the subsequent functions require that such a pointer be
5873  *      passed in.
5874  *
5875  *    oTXNFrameID:
5876  *      Unique ID for the frame.  This value is always set to 0.
5877  *
5878  *    iRefCon:
5879  *      Caller can set this to any value.  It is retained by the
5880  *      TXNNewObject which can later be asked to return it.
5881  *
5882  *  Result:
5883  *    If anything goes wrong the error is returned.  Success must be
5884  *    complete. That is if everything  works, but there is a failure
5885  *    reading a specified file the  object is freed.
5886  *
5887  *  Availability:
5888  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
5889  *    CarbonLib:        in CarbonLib 1.0 and later
5890  *    Non-Carbon CFM:   in Textension 1.0 and later
5891  }
TXNNewObjectnull5892 function TXNNewObject( {const} iFileSpec: FSSpecPtr { can be NULL }; iWindow: WindowRef; {const} iFrame: RectPtr { can be NULL }; iFrameOptions: TXNFrameOptions; iFrameType: TXNFrameType; iFileType: TXNFileType; iPermanentEncoding: TXNPermanentTextEncodingType; var oTXNObject: TXNObject; var oTXNFrameID: TXNFrameID; iRefCon: TXNObjectRefcon ): OSStatus; external name '_TXNNewObject';
5893 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
5894 
5895 
5896 {
5897  *  TXNTerminateTextension()   *** DEPRECATED ***
5898  *
5899  *  Deprecated:
5900  *    No longer needed.
5901  *
5902  *  Discussion:
5903  *    Close the Textension library.  It is necessary to call this
5904  *    function so that Textension can correctly close down any TSM
5905  *    connections and do other clean up.
5906  *
5907  *  Mac OS X threading:
5908  *    Not thread safe
5909  *
5910  *  Availability:
5911  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
5912  *    CarbonLib:        in CarbonLib 1.0 and later
5913  *    Non-Carbon CFM:   in Textension 1.0 and later
5914  }
5915 procedure TXNTerminateTextension; external name '_TXNTerminateTextension';
5916 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
5917 
5918 
5919 {
5920  *  TXNSetDataFromFile()   *** DEPRECATED ***
5921  *
5922  *  Deprecated:
5923  *    Use TXNSetDataFromCFURLRef API instead.
5924  *
5925  *  Discussion:
5926  *    Replace the specified range with the contents of the specified
5927  *    file.  The data fork of the file must be opened by the caller.
5928  *    Functional in NoUserIO mode.
5929  *
5930  *  Mac OS X threading:
5931  *    Not thread safe
5932  *
5933  *  Parameters:
5934  *
5935  *    iTXNObject:
5936  *      Opaque TXNObject obtained from TXNCreateObject.
5937  *
5938  *    iFileRefNum:
5939  *      File RefNum.
5940  *
5941  *    iFileType:
5942  *      File type.
5943  *
5944  *    iFileLength:
5945  *      The length of data in the file that should be considered data.
5946  *      This parameter is available to enable callers to embed text
5947  *      inside their own private data structures.  Note that if the
5948  *      data is in the Textension(txtn) format this parameter is
5949  *      ignored since length, etc. information is part of the format.
5950  *      Further note that if you you just want Textension to read a
5951  *      file and you are not interested in embedding you can just pass
5952  *      kTXNEndOffset, and Textension will use the file manager to
5953  *      determine the files length.
5954  *
5955  *    iStartOffset:
5956  *      Start position at which to insert the file into the document.
5957  *
5958  *    iEndOffset:
5959  *      End position of range being replaced by the file.
5960  *
5961  *  Result:
5962  *    File manager error or noErr.
5963  *
5964  *  Availability:
5965  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
5966  *    CarbonLib:        in CarbonLib 1.0 and later
5967  *    Non-Carbon CFM:   in Textension 1.0 and later
5968  }
TXNSetDataFromFilenull5969 function TXNSetDataFromFile( iTXNObject: TXNObject; iFileRefNum: SInt16; iFileType: OSType; iFileLength: ByteCount; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetDataFromFile';
5970 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
5971 
5972 
5973 {
5974  *  TXNConvertToPublicScrap()   *** DEPRECATED ***
5975  *
5976  *  Deprecated:
5977  *    This is a no-op in OS X.
5978  *
5979  *  Discussion:
5980  *    Convert the Textension private scrap to the public clipboard.
5981  *    This should be called on suspend events and before the
5982  *    application displays a dialog that might support cut and paste.
5983  *    Or more generally, whenever someone other than the Textension
5984  *    Shared Library needs access to the scrap data. This is a no-op in
5985  *    OS X.
5986  *
5987  *  Mac OS X threading:
5988  *    Not thread safe
5989  *
5990  *  Result:
5991  *    Memory Manager errors, Scrap Manager errors, or noErr.
5992  *
5993  *  Availability:
5994  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
5995  *    CarbonLib:        in CarbonLib 1.0 and later
5996  *    Non-Carbon CFM:   in Textension 1.0 and later
5997  }
TXNConvertToPublicScrapnull5998 function TXNConvertToPublicScrap: OSStatus; external name '_TXNConvertToPublicScrap';
5999 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6000 
6001 
6002 {
6003  *  TXNConvertFromPublicScrap()   *** DEPRECATED ***
6004  *
6005  *  Deprecated:
6006  *    No longer needed.
6007  *
6008  *  Discussion:
6009  *    Convert the  public clipboard to our private scrap .  This should
6010  *    be called on resume events and after an application has modified
6011  *    the scrap. Before doing work we check the validity of the public
6012  *    scrap (date modification and type).
6013  *
6014  *    This is no longer needed in Mac OS X version 10.2 and later.
6015  *    Calling TXNPaste will automatically handle conversion from public
6016  *    scrap.
6017  *
6018  *  Mac OS X threading:
6019  *    Not thread safe
6020  *
6021  *  Result:
6022  *    Memory Manager errors, Scrap Manager errors, or noErr.
6023  *
6024  *  Availability:
6025  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6026  *    CarbonLib:        in CarbonLib 1.0 and later
6027  *    Non-Carbon CFM:   in Textension 1.0 and later
6028  }
TXNConvertFromPublicScrapnull6029 function TXNConvertFromPublicScrap: OSStatus; external name '_TXNConvertFromPublicScrap';
6030 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6031 
6032 
6033 {
6034  *  TXNDraw()   *** DEPRECATED ***
6035  *
6036  *  Deprecated:
6037  *    Deprecated.
6038  *
6039  *  Discussion:
6040  *    Redraw the TXNObject including any scrollbars associated with the
6041  *    text frame.  Call this function in response to an update event
6042  *    for a window that contains multiple TXNObjects or some other
6043  *    graphic element.  The caller is responsible for calling
6044  *    BeginUpdate/EndUpdate in response to the update event.
6045  *
6046  *  Mac OS X threading:
6047  *    Not thread safe
6048  *
6049  *  Parameters:
6050  *
6051  *    iTXNObject:
6052  *      Opaque TXNObject obtained from TXNCreateObject.
6053  *
6054  *    iDrawPort:
6055  *      Can be NULL. If NULL the port is drawn to the port currently
6056  *      attached to the iTXNObject.  If not NULL drawing goes to the
6057  *      iDrawPort.  If drawing is done to the iDrawPort selection is
6058  *      not updated.  This works this way so that it is possible to
6059  *      Draw a TXNObject to a static port (i.e. print the thing without
6060  *      reflowing the text to match the paper size which is what
6061  *      TXNPrint does) and not have a line drawn where the selection
6062  *      would be.  If you pass an iDrawPort to an active TXNObject
6063  *      (i.e. editable) the selection will not be updated. In this case
6064  *      the selection will behave oddly until text is typed which will
6065  *      serve to realign the selection.  Bottom-line don't pass a port
6066  *      in unless you want static text (printed or non-editable)
6067  *
6068  *  Availability:
6069  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6070  *    CarbonLib:        in CarbonLib 1.0 and later
6071  *    Non-Carbon CFM:   in Textension 1.0 and later
6072  }
6073 procedure TXNDraw( iTXNObject: TXNObject; iDrawPort: GWorldPtr { can be NULL } ); external name '_TXNDraw';
6074 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6075 
6076 
6077 {
6078  *  TXNAttachObjectToWindow()   *** DEPRECATED ***
6079  *
6080  *  Deprecated:
6081  *    Use TXNAttachObjectToWindowRef API instead.
6082  *
6083  *  Discussion:
6084  *    If a TXNObject was initialized with a NULL window pointer use
6085  *    this function to attach a window to that object.  In version 1.0
6086  *    of Textension attaching a TXNObject to more than one window is
6087  *    not supported.  Note that if a CGContextRef was passed to the
6088  *    TXNObject previously through TXNSetTXNObjectControls, that
6089  *    CGContextRef will be ignored.  The CGContextRef associated with
6090  *    the iWindow will be used instead.  You may revert back to the
6091  *    previous CGContextRef by calling the TXNSetTXNObjectControls API
6092  *    with the desired CGContextRef again after calling
6093  *    TXNAttachObjectToWindow.
6094  *
6095  *  Mac OS X threading:
6096  *    Not thread safe
6097  *
6098  *  Parameters:
6099  *
6100  *    iTXNObject:
6101  *      Opaque TXNObject obtained from TXNCreateObject.
6102  *
6103  *    iWindow:
6104  *      GWorldPtr that the object should be attached to.
6105  *
6106  *    iIsActualWindow:
6107  *      Let the library know if the GWorldPtr is actually a WindowRef
6108  *      or actually a GWorldPtr.  This is important if the client is
6109  *      taking advantage of the editing packages scrollbar support.
6110  *
6111  *  Result:
6112  *    paramErrs or noErr.
6113  *
6114  *  Availability:
6115  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6116  *    CarbonLib:        in CarbonLib 1.0 and later
6117  *    Non-Carbon CFM:   in Textension 1.0 and later
6118  }
TXNAttachObjectToWindownull6119 function TXNAttachObjectToWindow( iTXNObject: TXNObject; iWindow: GWorldPtr; iIsActualWindow: Boolean ): OSStatus; external name '_TXNAttachObjectToWindow';
6120 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6121 
6122 
6123 {
6124  *  TXNIsObjectAttachedToWindow()   *** DEPRECATED ***
6125  *
6126  *  Deprecated:
6127  *    Deprecated.
6128  *
6129  *  Discussion:
6130  *    A utility function that allows a caller to check a TXNObject to
6131  *    see if it is attached to a window.
6132  *
6133  *  Mac OS X threading:
6134  *    Not thread safe
6135  *
6136  *  Parameters:
6137  *
6138  *    iTXNObject:
6139  *      Opaque TXNObject obtained from TXNCreateObject.
6140  *
6141  *  Result:
6142  *    True if object is attached, false if TXNObject is not attached.
6143  *
6144  *  Availability:
6145  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6146  *    CarbonLib:        in CarbonLib 1.0 and later
6147  *    Non-Carbon CFM:   in Textension 1.0 and later
6148  }
TXNIsObjectAttachedToWindownull6149 function TXNIsObjectAttachedToWindow( iTXNObject: TXNObject ): Boolean; external name '_TXNIsObjectAttachedToWindow';
6150 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6151 
6152 
6153 {
6154  *  TXNIsObjectAttachedToSpecificWindow()   *** DEPRECATED ***
6155  *
6156  *  Deprecated:
6157  *    Deprecated.
6158  *
6159  *  Discussion:
6160  *    Determines whether the given object is attached to the given
6161  *    window.
6162  *
6163  *  Mac OS X threading:
6164  *    Not thread safe
6165  *
6166  *  Parameters:
6167  *
6168  *    iTXNObject:
6169  *      Opaque TXNObject obtained from TXNNewObject.
6170  *
6171  *    iWindow:
6172  *      The window to check attachment against.
6173  *
6174  *    oAttached:
6175  *      true if the object is attached to the given window, false
6176  *      otherwise.
6177  *
6178  *  Result:
6179  *    An operating system status code.
6180  *
6181  *  Availability:
6182  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6183  *    CarbonLib:        in CarbonLib 1.3 and later
6184  *    Non-Carbon CFM:   in Textension 1.2 and later
6185  }
TXNIsObjectAttachedToSpecificWindownull6186 function TXNIsObjectAttachedToSpecificWindow( iTXNObject: TXNObject; iWindow: WindowRef; var oAttached: Boolean ): OSStatus; external name '_TXNIsObjectAttachedToSpecificWindow';
6187 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6188 
6189 
6190 {
6191  *  TXNSetRectBounds()   *** DEPRECATED ***
6192  *
6193  *  Deprecated:
6194  *    Use TXNSetHIRectBounds API instead.
6195  *
6196  *  Discussion:
6197  *    The View rectangle controls the text you see.  The Destination
6198  *    rectangle controls how text is laid out.  The Scrollbar is drawn
6199  *    inside the View rectangle. You only need to pass in pointers for
6200  *    the rectangles you want to set.
6201  *
6202  *  Mac OS X threading:
6203  *    Not thread safe
6204  *
6205  *  Parameters:
6206  *
6207  *    iTXNObject:
6208  *      Opaque TXNObject obtained from TXNNewObject.
6209  *
6210  *    iViewRect:
6211  *      The new view rectangle.  If you do not want to change the view
6212  *      rectangle pass NULL.
6213  *
6214  *    iDestinationRect:
6215  *      The new destination rectangle.  Pass NULL if you don't want to
6216  *      change the destination retangle.
6217  *
6218  *    iUpdate:
6219  *      If you would like the the text and where the scrollbars are
6220  *      placed recalculated and redrawn pass true.  If you prefer to
6221  *      wait on this pass false.
6222  *
6223  *  Availability:
6224  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6225  *    CarbonLib:        in CarbonLib 1.5 and later
6226  *    Non-Carbon CFM:   not available
6227  }
6228 procedure TXNSetRectBounds( iTXNObject: TXNObject; {const} iViewRect: RectPtr { can be NULL }; {const} iDestinationRect: TXNLongRectPtr { can be NULL }; iUpdate: Boolean ); external name '_TXNSetRectBounds';
6229 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6230 
6231 
6232 {
6233  *  TXNGetRectBounds()   *** DEPRECATED ***
6234  *
6235  *  Deprecated:
6236  *    Use TXNGetHIRect API instead.
6237  *
6238  *  Discussion:
6239  *    Get the values for the current View rectangle, Destination
6240  *    rectangle and Text rectangle.  You only need to pass in pointers
6241  *    for the rectangles you're interested in.
6242  *
6243  *  Mac OS X threading:
6244  *    Not thread safe
6245  *
6246  *  Parameters:
6247  *
6248  *    iTXNObject:
6249  *      Opaque TXNObject obtained from TXNNewObject.
6250  *
6251  *    oViewRect:
6252  *      The current view rectangle
6253  *
6254  *    oDestinationRect:
6255  *      The current destination rectangle
6256  *
6257  *    oTextRect:
6258  *      The smallest rectangle needed to contain the current text.
6259  *      This rectangle is calculated by walking the lines of text and
6260  *      measuring each line.  So this can be expensive.  The width of
6261  *      this rectangle will be the width of the longest line in the
6262  *      text.
6263  *
6264  *  Result:
6265  *    An operating system status code.
6266  *
6267  *  Availability:
6268  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6269  *    CarbonLib:        in CarbonLib 1.5 and later
6270  *    Non-Carbon CFM:   not available
6271  }
TXNGetRectBoundsnull6272 function TXNGetRectBounds( iTXNObject: TXNObject; oViewRect: RectPtr { can be NULL }; oDestinationRect: TXNLongRectPtr { can be NULL }; oTextRect: TXNLongRectPtr { can be NULL } ): OSStatus; external name '_TXNGetRectBounds';
6273 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6274 
6275 
6276 {
6277  *  TXNActivate()   *** DEPRECATED ***
6278  *
6279  *  Deprecated:
6280  *    Use TXNSetScrollbarState API instead.
6281  *
6282  *  Discussion:
6283  *    Make the TXNObject object active in the sense that it can be
6284  *    scrolled if it has scrollbars. If the TXNScrollBarState parameter
6285  *    is true than the scrollbars will be active even when the
6286  *    TXNObject is not focused (i.e. insertion point not active).  See
6287  *    the equivalent TXNSetScrollbarState.
6288  *
6289  *    This function should be used if you have multiple TXNObjects in a
6290  *    window, and you want them all to be scrollable even though only
6291  *    one at a time can have the keyboard focus.
6292  *
6293  *  Mac OS X threading:
6294  *    Not thread safe
6295  *
6296  *  Parameters:
6297  *
6298  *    iTXNObject:
6299  *      Opaque TXNObject obtained from TXNCreateObject.
6300  *
6301  *    iTXNFrameID:
6302  *      TXNFrameID obtained from TXNNewObject.  Deprecated.  Pass 0.
6303  *
6304  *    iActiveState:
6305  *      Boolean if true Scrollbars active even though TXNObject does
6306  *      not have the keyboard focus. if false scrollbars are synced
6307  *      with active state (i.e. a focused object has an active
6308  *      insertion point or selection and active scrollbars. An
6309  *      unfocused object has inactive selection (grayed or framed
6310  *      selection) and inactive scrollbars.  The latter state is the
6311  *      default and usually the one you use if you have one TXNObject
6312  *      in a window.
6313  *
6314  *  Result:
6315  *    A result code indicating success or failure.
6316  *
6317  *  Availability:
6318  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6319  *    CarbonLib:        in CarbonLib 1.0 and later
6320  *    Non-Carbon CFM:   in Textension 1.0 and later
6321  }
TXNActivatenull6322 function TXNActivate( iTXNObject: TXNObject; iTXNFrameID: TXNFrameID; iActiveState: TXNScrollBarState ): OSStatus; external name '_TXNActivate';
6323 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6324 
6325 
6326 {
6327  *  TXNPointToOffset()   *** DEPRECATED ***
6328  *
6329  *  Deprecated:
6330  *    Use TXNHIPointToOffset API instead.
6331  *
6332  *  Mac OS X threading:
6333  *    Not thread safe
6334  *
6335  *  Parameters:
6336  *
6337  *    iTXNObject:
6338  *      Opaque TXNObject obtained from TXNCreateObject.
6339  *
6340  *    iPoint:
6341  *      A point (in local coordinates).
6342  *
6343  *    oOffset:
6344  *      Offset corresponding to the point.
6345  *
6346  *  Result:
6347  *    A result code indicating success or failure. Memory, out of
6348  *    bounds errors (if the point is out of the ViewRect).
6349  *
6350  *  Availability:
6351  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6352  *    CarbonLib:        in CarbonLib 1.1 and later
6353  *    Non-Carbon CFM:   in Textension 1.1 and later
6354  }
TXNPointToOffsetnull6355 function TXNPointToOffset( iTXNObject: TXNObject; iPoint: Point; var oOffset: TXNOffset ): OSStatus; external name '_TXNPointToOffset';
6356 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6357 
6358 
6359 {
6360  *  TXNOffsetToPoint()   *** DEPRECATED ***
6361  *
6362  *  Deprecated:
6363  *    Use TXNOffsetToHIPoint API instead.
6364  *
6365  *  Mac OS X threading:
6366  *    Not thread safe
6367  *
6368  *  Parameters:
6369  *
6370  *    iTXNObject:
6371  *      Opaque TXNObject obtained from TXNCreateObject.
6372  *
6373  *    iOffset:
6374  *      An offset.
6375  *
6376  *    oPoint:
6377  *      Point corresponding to the offset.
6378  *
6379  *  Result:
6380  *    A result code indicating success or failure. Memory, out of
6381  *    bounds errors.
6382  *
6383  *  Availability:
6384  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.3
6385  *    CarbonLib:        in CarbonLib 1.1 and later
6386  *    Non-Carbon CFM:   in Textension 1.1 and later
6387  }
TXNOffsetToPointnull6388 function TXNOffsetToPoint( iTXNObject: TXNObject; iOffset: TXNOffset; var oPoint: Point ): OSStatus; external name '_TXNOffsetToPoint';
6389 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_3 *)
6390 
6391 
6392 {������������������������������������������������������������������������������������������������������}
6393 {  � DEPRECATED APIs, Mac OS X version 10.4 and later                                                  }
6394 {������������������������������������������������������������������������������������������������������}
6395 
6396 {
6397  *  TXNCanUndo()   *** DEPRECATED ***
6398  *
6399  *  Deprecated:
6400  *    Use TXNCanUndoAction API instead.
6401  *
6402  *  Summary:
6403  *    Use this to determine if the Undo item in Edit menu should be
6404  *    highlighted or not. Tells you if last command was undoable.
6405  *
6406  *  Mac OS X threading:
6407  *    Not thread safe
6408  *
6409  *  Parameters:
6410  *
6411  *    iTXNObject:
6412  *      Opaque TXNObject obtained from TXNCreateObject.
6413  *
6414  *    oTXNActionKey:
6415  *      The key code that the caller can use to pick a string to
6416  *      describe the undoable action in the undo item.  Pass in NULL if
6417  *      the string isn't needed.
6418  *
6419  *  Result:
6420  *    Boolean: If True the last command is undoable and the undo item
6421  *    in the menu should be active.  If false last command cannot be
6422  *    undone and undo should be grayed in the menu.
6423  *
6424  *  Availability:
6425  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6426  *    CarbonLib:        in CarbonLib 1.0 and later
6427  *    Non-Carbon CFM:   in Textension 1.0 and later
6428  }
TXNCanUndonull6429 function TXNCanUndo( iTXNObject: TXNObject; oTXNActionKey: TXNActionKeyPtr { can be NULL } ): Boolean; external name '_TXNCanUndo';
6430 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6431 
6432 
6433 {
6434  *  TXNCanRedo()   *** DEPRECATED ***
6435  *
6436  *  Deprecated:
6437  *    Use TXNCanRedoAction API instead.
6438  *
6439  *  Summary:
6440  *    Use this to determine if the current item on the undo stack is
6441  *    redoable.
6442  *
6443  *  Mac OS X threading:
6444  *    Not thread safe
6445  *
6446  *  Parameters:
6447  *
6448  *    iTXNObject:
6449  *      Opaque TXNObject obtained from TXNCreateObject.
6450  *
6451  *    oTXNActionKey:
6452  *      The key code that the caller can use to pick a string to
6453  *      describe the redoable action in the redo item.  Pass in NULL if
6454  *      the string isn't needed.
6455  *
6456  *  Result:
6457  *    If it returns true, then the redo item in the edit menu should be
6458  *    active.
6459  *
6460  *  Availability:
6461  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6462  *    CarbonLib:        in CarbonLib 1.0 and later
6463  *    Non-Carbon CFM:   in Textension 1.0 and later
6464  }
TXNCanRedonull6465 function TXNCanRedo( iTXNObject: TXNObject; oTXNActionKey: TXNActionKeyPtr { can be NULL } ): Boolean; external name '_TXNCanRedo';
6466 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6467 
6468 
6469 {
6470  *  TXNGetActionChangeCount()   *** DEPRECATED ***
6471  *
6472  *  Deprecated:
6473  *    Use TXNGetCountForActionType API instead.
6474  *
6475  *  Summary:
6476  *    Retrieves the number of times the specified action(s) have
6477  *    occurred.
6478  *
6479  *  Discussion:
6480  *    Explicit call to TXNClearActionChangeCount is needed when the
6481  *    counter(s) have to be reset.
6482  *
6483  *  Mac OS X threading:
6484  *    Not thread safe
6485  *
6486  *  Parameters:
6487  *
6488  *    iTXNObject:
6489  *      Opaque TXNObject obtained from TXNCreateObject.
6490  *
6491  *    iOptions:
6492  *      Specify the the type of action changes to be include when
6493  *      retrieving the count.  Choose from the TXNOptions.
6494  *
6495  *    oCount:
6496  *      The number of counts returned by the function.
6497  *
6498  *  Result:
6499  *    An operating system status code.
6500  *
6501  *  Availability:
6502  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6503  *    CarbonLib:        in CarbonLib 1.3 and later
6504  *    Non-Carbon CFM:   in Textension 1.3 and later
6505  }
TXNGetActionChangeCountnull6506 function TXNGetActionChangeCount( iTXNObject: TXNObject; iOptions: TXNCountOptions; var oCount: ItemCount ): OSStatus; external name '_TXNGetActionChangeCount';
6507 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6508 
6509 
6510 {
6511  *  TXNClearActionChangeCount()   *** DEPRECATED ***
6512  *
6513  *  Deprecated:
6514  *    Use TXNClearCountForActionType API instead.
6515  *
6516  *  Summary:
6517  *    Reset the specified action counter(s) to zero.
6518  *
6519  *  Discussion:
6520  *    Use kAllCountMask to reset everything.
6521  *
6522  *  Mac OS X threading:
6523  *    Not thread safe
6524  *
6525  *  Parameters:
6526  *
6527  *    iTXNObject:
6528  *      Opaque TXNObject obtained from TXNCreateObject.
6529  *
6530  *    iOptions:
6531  *      Specify the the type of action changes to be included when
6532  *      resetting the count.  Choose from the TXNOptions.
6533  *
6534  *  Result:
6535  *    An operating system status code.
6536  *
6537  *  Availability:
6538  *    Mac OS X:         in version 10.1 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6539  *    CarbonLib:        in CarbonLib 1.3 and later
6540  *    Non-Carbon CFM:   in Textension 1.3 and later
6541  }
TXNClearActionChangeCountnull6542 function TXNClearActionChangeCount( iTXNObject: TXNObject; iOptions: TXNCountOptions ): OSStatus; external name '_TXNClearActionChangeCount';
6543 (* AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6544 
6545 
6546 {
6547  *  TXNSetDataFromCFURLRef()   *** DEPRECATED ***
6548  *
6549  *  Deprecated:
6550  *    Use TXNReadFromCFURL API instead.
6551  *
6552  *  Summary:
6553  *    Replaces a range of data with the content of a file.
6554  *
6555  *  Discussion:
6556  *    Uses URL file name extension to determine the type of the input
6557  *    file. If the entire content is replaced, calling TXNRevert will
6558  *    revert to the last saved CFURLRef.
6559  *
6560  *  Mac OS X threading:
6561  *    Not thread safe
6562  *
6563  *  Parameters:
6564  *
6565  *    iTXNObject:
6566  *      Opaque TXNObject obtained from TXNCreateObject.  Data will be
6567  *      added to this text object.
6568  *
6569  *    iURL:
6570  *      The url referring to the file which contains the data you want
6571  *      to add to the object.
6572  *
6573  *    iStartOffset:
6574  *      The starting offset at which to insert the file into a
6575  *      document.. If you want to replace the entire text content then
6576  *      set the iStartOffset parameter to kTXNStartOffset.
6577  *
6578  *    iEndOffset:
6579  *      The ending position of the range being replaced by the file. If
6580  *      you want to replace the entire text content then set the
6581  *      iEndOffset parameter to kTXNEndOffset.
6582  *
6583  *  Result:
6584  *    A result code indicating success or failure.
6585  *
6586  *  Availability:
6587  *    Mac OS X:         in version 10.3 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6588  *    CarbonLib:        not available in CarbonLib 1.x, is available on Mac OS X version 10.3 and later
6589  *    Non-Carbon CFM:   not available
6590  }
TXNSetDataFromCFURLRefnull6591 function TXNSetDataFromCFURLRef( iTXNObject: TXNObject; iURL: CFURLRef; iStartOffset: TXNOffset; iEndOffset: TXNOffset ): OSStatus; external name '_TXNSetDataFromCFURLRef';
6592 (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6593 
6594 
6595 {
6596  *  TXNSave()   *** DEPRECATED ***
6597  *
6598  *  Deprecated:
6599  *    Use TXNWriteRangeToCFURL API instead.
6600  *
6601  *  Summary:
6602  *    Save the contents of the document as the given type.
6603  *
6604  *  Mac OS X threading:
6605  *    Not thread safe
6606  *
6607  *  Parameters:
6608  *
6609  *    iTXNObject:
6610  *      Opaque TXNObject obtained from TXNCreateObject.
6611  *
6612  *    iType:
6613  *      The type of file to create.
6614  *
6615  *    iResType:
6616  *      When saving file as plain TEXT the type of resource to save
6617  *      style information. Use kTXNMultipleStylesPerTextDocumentResType
6618  *      if your document contains multiple styles and you want a
6619  *      SimpleText like document.  Use
6620  *      kTXNSingleStylePerTextDocumentResType if the document has a
6621  *      single style and you would like a BBEdit, MPW, CW type of
6622  *      document.
6623  *
6624  *    iPermanentEncoding:
6625  *      The encoding in which the document should be saved (Unicode,
6626  *      Text or System default).
6627  *
6628  *    iFileSpecification:
6629  *      The file specification to which the document should be saved.
6630  *      The file must have been opened by the caller.  The file
6631  *      specification is remembered by the TXNObject and is used for
6632  *      any subsequent calls to TXNRevert.
6633  *
6634  *    iDataReference:
6635  *      The data fork ref num.  This is used to write data to the data
6636  *      fork of the file. The data is written beginning at the current
6637  *      mark.
6638  *
6639  *    iResourceReference:
6640  *      The resource fork ref num.  If the caller has specified that
6641  *      style information be saved as a resource (MPW or SimpleText)
6642  *      than this should be a valid reference to an open resource fork.
6643  *       If the txtn format is being used than this input value is
6644  *      ignored.
6645  *
6646  *  Result:
6647  *    The result of writing the file.
6648  *
6649  *  Availability:
6650  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6651  *    CarbonLib:        in CarbonLib 1.0 and later
6652  *    Non-Carbon CFM:   in Textension 1.0 and later
6653  }
TXNSavenull6654 function TXNSave( iTXNObject: TXNObject; iType: TXNFileType; iResType: OSType; iPermanentEncoding: TXNPermanentTextEncodingType; const (*var*) iFileSpecification: FSSpec; iDataReference: SInt16; iResourceReference: SInt16 ): OSStatus; external name '_TXNSave';
6655 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6656 
6657 
6658 {������������������������������������������������������������������������������������������������������}
6659 {  � DEPRECATED APIs, Mac OS X version 10.5 and later                                                  }
6660 {������������������������������������������������������������������������������������������������������}
6661 {������������������������������������������������������������������������������������������������������}
6662 {  � Font Menu                                                                                         }
6663 {������������������������������������������������������������������������������������������������������}
6664 {
6665  *  TXNNewFontMenuObject()   *** DEPRECATED ***
6666  *
6667  *  Deprecated:
6668  *    Use Font Panel instead.
6669  *
6670  *  Summary:
6671  *    Get a FontMenuObject.  Caller can extract a fontmenu from this
6672  *    object and pass this object to the active TXNObject to handle
6673  *    events in the font menu.
6674  *
6675  *  Mac OS X threading:
6676  *    Not thread safe
6677  *
6678  *  Parameters:
6679  *
6680  *    iFontMenuHandle:
6681  *      An empty menu handle (well the title is there) that the caller
6682  *      created via NewMenu or GetNewMenu. This menu handle should not
6683  *      be disposed before the returned TXNFontMenuObject has been
6684  *      disposed via TXNDisposeFontMenuObject.
6685  *
6686  *    iMenuID:
6687  *      The MenuID for iFontMenuHandle.
6688  *
6689  *    iStartHierMenuID:
6690  *      The first MenuID to use if any hierarchical menus need to be
6691  *      created. TXNNewFontMenuObject uses SetMenuItemHierarchicalID
6692  *      when creating hierarchial menus.  The iStartHierMenuID must
6693  *      therefore follow the rules for this function.  On systems less
6694  *      than system 8.5 the submenuID must be less than 255.  For
6695  *      systems above system 8.5 the range can be as large as 32767.
6696  *      However, it is important to remember that TXNNewFontMenuObject
6697  *      only uses iStartHierMenuID as a starting id when adding
6698  *      hierarchical menus.  Therefore provide plenty of room to
6699  *      increment this value. For example, on a system less than 8.5 it
6700  *      would be good to start at 175.  On systems greater than 8.5 it
6701  *      is probably a good idea to not use a value higher than 32000.
6702  *
6703  *    oTXNFontMenuObject:
6704  *      A font menu object.
6705  *
6706  *  Result:
6707  *    A result code indicating success or failure.
6708  *
6709  *  Availability:
6710  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
6711  *    CarbonLib:        in CarbonLib 1.0 and later
6712  *    Non-Carbon CFM:   in Textension 1.0 and later
6713  }
TXNNewFontMenuObjectnull6714 function TXNNewFontMenuObject( iFontMenuHandle: MenuRef; iMenuID: SInt16; iStartHierMenuID: SInt16; var oTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNNewFontMenuObject';
6715 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
6716 
6717 
6718 {
6719  *  TXNGetFontMenuHandle()   *** DEPRECATED ***
6720  *
6721  *  Deprecated:
6722  *    Use Font Panel instead.
6723  *
6724  *  Summary:
6725  *    Get the MenuRef from the TXNFontMenuObject.
6726  *
6727  *  Mac OS X threading:
6728  *    Not thread safe
6729  *
6730  *  Parameters:
6731  *
6732  *    iTXNFontMenuObject:
6733  *      A Font Menu Object obtained from TXNNewFontMenuObject.
6734  *
6735  *    oFontMenuHandle:
6736  *      The returned font menu. Returned value could be NULL.
6737  *
6738  *  Result:
6739  *    A result code indicating success or failure.
6740  *
6741  *  Availability:
6742  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
6743  *    CarbonLib:        in CarbonLib 1.0 and later
6744  *    Non-Carbon CFM:   in Textension 1.0 and later
6745  }
TXNGetFontMenuHandlenull6746 function TXNGetFontMenuHandle( iTXNFontMenuObject: TXNFontMenuObject; var oFontMenuHandle: MenuRef ): OSStatus; external name '_TXNGetFontMenuHandle';
6747 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
6748 
6749 
TXNGetFontMenuRefnull6750 function TXNGetFontMenuRef( iTXNFontMenuObject: TXNFontMenuObject; var oFontMenuHandle: MenuRef ): OSStatus; external name '_TXNGetFontMenuHandle';
6751 
6752 {
6753  *  TXNDisposeFontMenuObject()   *** DEPRECATED ***
6754  *
6755  *  Deprecated:
6756  *    Use Font Panel instead.
6757  *
6758  *  Summary:
6759  *    Dispose a TXNFontMenuObject and its font menu handle.
6760  *
6761  *  Mac OS X threading:
6762  *    Not thread safe
6763  *
6764  *  Parameters:
6765  *
6766  *    iTXNFontMenuObject:
6767  *      A Font Menu Object obtained from TXNNewFontMenuObject.
6768  *
6769  *  Result:
6770  *    A result code indicating success or failure.
6771  *
6772  *  Availability:
6773  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
6774  *    CarbonLib:        in CarbonLib 1.0 and later
6775  *    Non-Carbon CFM:   in Textension 1.0 and later
6776  }
TXNDisposeFontMenuObjectnull6777 function TXNDisposeFontMenuObject( iTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNDisposeFontMenuObject';
6778 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
6779 
6780 
6781 {
6782  *  TXNDoFontMenuSelection()   *** DEPRECATED ***
6783  *
6784  *  Deprecated:
6785  *    Use Font Panel instead.
6786  *
6787  *  Summary:
6788  *    Given the menuID and menu item returned by MenuSelect determine
6789  *    the selected font and change the current selection to be that
6790  *    Font.  If the input TXNObject is not active a parameter error is
6791  *    returned.
6792  *
6793  *  Mac OS X threading:
6794  *    Not thread safe
6795  *
6796  *  Parameters:
6797  *
6798  *    iTXNObject:
6799  *      Opaque TXNObject obtained from TXNCreateObject.
6800  *
6801  *    iTXNFontMenuObject:
6802  *      A Font Menu Object obtained from TXNNewFontMenuObject.
6803  *
6804  *    iMenuID:
6805  *      SInt16 the ID of the selected menu.
6806  *
6807  *    iMenuItem:
6808  *      The item that was selected.
6809  *
6810  *  Result:
6811  *    A result code indicating success or failure.
6812  *
6813  *  Availability:
6814  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
6815  *    CarbonLib:        in CarbonLib 1.0 and later
6816  *    Non-Carbon CFM:   in Textension 1.0 and later
6817  }
TXNDoFontMenuSelectionnull6818 function TXNDoFontMenuSelection( iTXNObject: TXNObject; iTXNFontMenuObject: TXNFontMenuObject; iMenuID: SInt16; iMenuItem: SInt16 ): OSStatus; external name '_TXNDoFontMenuSelection';
6819 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
6820 
6821 
6822 {
6823  *  TXNPrepareFontMenu()   *** DEPRECATED ***
6824  *
6825  *  Deprecated:
6826  *    Use Font Panel instead.
6827  *
6828  *  Summary:
6829  *    Prepares a Font menu for display.
6830  *
6831  *  Discussion:
6832  *    You should call the TXNPrepareFontMenu function just before your
6833  *    application opens the Font menu for your user. If the text
6834  *    object�s current selection is a single font, MLTE places a
6835  *    checkmark next to the menu item for that font.
6836  *
6837  *  Mac OS X threading:
6838  *    Not thread safe
6839  *
6840  *  Parameters:
6841  *
6842  *    iTXNObject:
6843  *      The text object that identifies the document with the Font menu
6844  *      you want to prepare. Pass NULL to display an inactive menu
6845  *      (dimmed).
6846  *
6847  *    iTXNFontMenuObject:
6848  *      A Font menu object.
6849  *
6850  *  Result:
6851  *    An operating system status code.
6852  *
6853  *  Availability:
6854  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.5
6855  *    CarbonLib:        in CarbonLib 1.0 and later
6856  *    Non-Carbon CFM:   in Textension 1.0 and later
6857  }
TXNPrepareFontMenunull6858 function TXNPrepareFontMenu( iTXNObject: TXNObject { can be NULL }; iTXNFontMenuObject: TXNFontMenuObject ): OSStatus; external name '_TXNPrepareFontMenu';
6859 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5 *)
6860 
6861 
6862 {������������������������������������������������������������������������������������������������������}
6863 {  � Font Defaults                                                                                     }
6864 {������������������������������������������������������������������������������������������������������}
6865 
6866 {
6867  *  TXNSetFontDefaults()   *** DEPRECATED ***
6868  *
6869  *  Summary:
6870  *    For a given TXNObject specify the font defaults for each script.
6871  *
6872  *  Mac OS X threading:
6873  *    Not thread safe
6874  *
6875  *  Parameters:
6876  *
6877  *    iTXNObject:
6878  *      Opaque TXNObject obtained from TXNCreateObject.
6879  *
6880  *    iCount:
6881  *      Count of FontDescriptions.
6882  *
6883  *    iFontDefaults:
6884  *      Array of FontDescriptions.
6885  *
6886  *  Result:
6887  *    A result code indicating success or failure.
6888  *
6889  *  Availability:
6890  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6891  *    CarbonLib:        in CarbonLib 1.0 and later
6892  *    Non-Carbon CFM:   in Textension 1.0 and later
6893  }
TXNSetFontDefaultsnull6894 function TXNSetFontDefaults( iTXNObject: TXNObject; iCount: ItemCount; {const} iFontDefaults: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr ): OSStatus; external name '_TXNSetFontDefaults';
6895 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6896 
6897 
6898 {
6899  *  TXNGetFontDefaults()   *** DEPRECATED ***
6900  *
6901  *  Summary:
6902  *    For a given TXNObject make a copy of the font defaults.
6903  *
6904  *  Discussion:
6905  *    To determine how many font descriptions need to be in the array
6906  *    you should call this function with a NULL for the array.  iCount
6907  *    will return with the number of font defaults currently stored.
6908  *
6909  *  Mac OS X threading:
6910  *    Not thread safe
6911  *
6912  *  Parameters:
6913  *
6914  *    iTXNObject:
6915  *      Opaque TXNObject obtained from TXNCreateObject.
6916  *
6917  *    ioCount:
6918  *      Count of FontDescriptions in the array.
6919  *
6920  *    oFontDefaults:
6921  *      Array of FontDescriptins to be filled out.
6922  *
6923  *  Result:
6924  *    A result code indicating success or failure.
6925  *
6926  *  Availability:
6927  *    Mac OS X:         in version 10.0 and later in Carbon.framework [32-bit only] but deprecated in 10.4
6928  *    CarbonLib:        in CarbonLib 1.0 and later
6929  *    Non-Carbon CFM:   in Textension 1.0 and later
6930  }
TXNGetFontDefaultsnull6931 function TXNGetFontDefaults( iTXNObject: TXNObject; var ioCount: ItemCount; oFontDefaults: {variable-size-array} TXNMacOSPreferredFontDescriptionPtr { can be NULL } ): OSStatus; external name '_TXNGetFontDefaults';
6932 (* AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_4 *)
6933 
6934 
6935 {$endc} {not TARGET_CPU_64}
6936 
6937 {$endc} {TARGET_OS_MAC}
6938 
6939 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
6940 
6941 end.
6942 {$endc} {not MACOSALLINCLUDE}
6943