1 {
2 * CTParagraphStyle.h
3 * CoreText
4 *
5 * Copyright (c) 2004-2012 Apple Inc. All rights reserved.
6 *
7 }
8 { Initial Pascal Translation: Jonas Maebe, <jonas@freepascal.org>, October 2009 }
9 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, October 2012 }
10 { Pascal Translation Updated: Jonas Maebe, <jonas@freepascal.org>, August 2015 }
11 {
12 Modified for use with Free Pascal
13 Version 308
14 Please report any bugs to <gpc@microbizz.nl>
15 }
16
17 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
18 {$mode macpas}
19 {$modeswitch cblocks}
20 {$packenum 1}
21 {$macro on}
22 {$inline on}
23 {$calling mwpascal}
24
25 unit CTParagraphStyle;
26 interface
27 {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
28 {$setc GAP_INTERFACES_VERSION := $0308}
29
30 {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
31 {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
32 {$endc}
33
34 {$ifc defined CPUPOWERPC and defined CPUI386}
35 {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
36 {$endc}
37 {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
38 {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
39 {$endc}
40
41 {$ifc not defined __ppc__ and defined CPUPOWERPC32}
42 {$setc __ppc__ := 1}
43 {$elsec}
44 {$setc __ppc__ := 0}
45 {$endc}
46 {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
47 {$setc __ppc64__ := 1}
48 {$elsec}
49 {$setc __ppc64__ := 0}
50 {$endc}
51 {$ifc not defined __i386__ and defined CPUI386}
52 {$setc __i386__ := 1}
53 {$elsec}
54 {$setc __i386__ := 0}
55 {$endc}
56 {$ifc not defined __x86_64__ and defined CPUX86_64}
57 {$setc __x86_64__ := 1}
58 {$elsec}
59 {$setc __x86_64__ := 0}
60 {$endc}
61 {$ifc not defined __arm__ and defined CPUARM}
62 {$setc __arm__ := 1}
63 {$elsec}
64 {$setc __arm__ := 0}
65 {$endc}
66 {$ifc not defined __arm64__ and defined CPUAARCH64}
67 {$setc __arm64__ := 1}
68 {$elsec}
69 {$setc __arm64__ := 0}
70 {$endc}
71
72 {$ifc defined cpu64}
73 {$setc __LP64__ := 1}
74 {$elsec}
75 {$setc __LP64__ := 0}
76 {$endc}
77
78
79 {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
80 {$error Conflicting definitions for __ppc__ and __i386__}
81 {$endc}
82
83 {$ifc defined __ppc__ and __ppc__}
84 {$setc TARGET_CPU_PPC := TRUE}
85 {$setc TARGET_CPU_PPC64 := FALSE}
86 {$setc TARGET_CPU_X86 := FALSE}
87 {$setc TARGET_CPU_X86_64 := FALSE}
88 {$setc TARGET_CPU_ARM := FALSE}
89 {$setc TARGET_CPU_ARM64 := FALSE}
90 {$setc TARGET_OS_MAC := TRUE}
91 {$setc TARGET_OS_IPHONE := FALSE}
92 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
93 {$setc TARGET_OS_EMBEDDED := FALSE}
94 {$elifc defined __ppc64__ and __ppc64__}
95 {$setc TARGET_CPU_PPC := FALSE}
96 {$setc TARGET_CPU_PPC64 := TRUE}
97 {$setc TARGET_CPU_X86 := FALSE}
98 {$setc TARGET_CPU_X86_64 := FALSE}
99 {$setc TARGET_CPU_ARM := FALSE}
100 {$setc TARGET_CPU_ARM64 := FALSE}
101 {$setc TARGET_OS_MAC := TRUE}
102 {$setc TARGET_OS_IPHONE := FALSE}
103 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
104 {$setc TARGET_OS_EMBEDDED := FALSE}
105 {$elifc defined __i386__ and __i386__}
106 {$setc TARGET_CPU_PPC := FALSE}
107 {$setc TARGET_CPU_PPC64 := FALSE}
108 {$setc TARGET_CPU_X86 := TRUE}
109 {$setc TARGET_CPU_X86_64 := FALSE}
110 {$setc TARGET_CPU_ARM := FALSE}
111 {$setc TARGET_CPU_ARM64 := FALSE}
112 {$ifc defined iphonesim}
113 {$setc TARGET_OS_MAC := FALSE}
114 {$setc TARGET_OS_IPHONE := TRUE}
115 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
116 {$elsec}
117 {$setc TARGET_OS_MAC := TRUE}
118 {$setc TARGET_OS_IPHONE := FALSE}
119 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
120 {$endc}
121 {$setc TARGET_OS_EMBEDDED := FALSE}
122 {$elifc defined __x86_64__ and __x86_64__}
123 {$setc TARGET_CPU_PPC := FALSE}
124 {$setc TARGET_CPU_PPC64 := FALSE}
125 {$setc TARGET_CPU_X86 := FALSE}
126 {$setc TARGET_CPU_X86_64 := TRUE}
127 {$setc TARGET_CPU_ARM := FALSE}
128 {$setc TARGET_CPU_ARM64 := FALSE}
129 {$ifc defined iphonesim}
130 {$setc TARGET_OS_MAC := FALSE}
131 {$setc TARGET_OS_IPHONE := TRUE}
132 {$setc TARGET_IPHONE_SIMULATOR := TRUE}
133 {$elsec}
134 {$setc TARGET_OS_MAC := TRUE}
135 {$setc TARGET_OS_IPHONE := FALSE}
136 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
137 {$endc}
138 {$setc TARGET_OS_EMBEDDED := FALSE}
139 {$elifc defined __arm__ and __arm__}
140 {$setc TARGET_CPU_PPC := FALSE}
141 {$setc TARGET_CPU_PPC64 := FALSE}
142 {$setc TARGET_CPU_X86 := FALSE}
143 {$setc TARGET_CPU_X86_64 := FALSE}
144 {$setc TARGET_CPU_ARM := TRUE}
145 {$setc TARGET_CPU_ARM64 := FALSE}
146 {$setc TARGET_OS_MAC := FALSE}
147 {$setc TARGET_OS_IPHONE := TRUE}
148 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
149 {$setc TARGET_OS_EMBEDDED := TRUE}
150 {$elifc defined __arm64__ and __arm64__}
151 {$setc TARGET_CPU_PPC := FALSE}
152 {$setc TARGET_CPU_PPC64 := FALSE}
153 {$setc TARGET_CPU_X86 := FALSE}
154 {$setc TARGET_CPU_X86_64 := FALSE}
155 {$setc TARGET_CPU_ARM := FALSE}
156 {$setc TARGET_CPU_ARM64 := TRUE}
157 {$ifc defined ios}
158 {$setc TARGET_OS_MAC := FALSE}
159 {$setc TARGET_OS_IPHONE := TRUE}
160 {$setc TARGET_OS_EMBEDDED := TRUE}
161 {$elsec}
162 {$setc TARGET_OS_MAC := TRUE}
163 {$setc TARGET_OS_IPHONE := FALSE}
164 {$setc TARGET_OS_EMBEDDED := FALSE}
165 {$endc}
166 {$setc TARGET_IPHONE_SIMULATOR := FALSE}
167 {$elsec}
168 {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
169 {$endc}
170
171 {$ifc defined __LP64__ and __LP64__ }
172 {$setc TARGET_CPU_64 := TRUE}
173 {$elsec}
174 {$setc TARGET_CPU_64 := FALSE}
175 {$endc}
176
177 {$ifc defined FPC_BIG_ENDIAN}
178 {$setc TARGET_RT_BIG_ENDIAN := TRUE}
179 {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
180 {$elifc defined FPC_LITTLE_ENDIAN}
181 {$setc TARGET_RT_BIG_ENDIAN := FALSE}
182 {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
183 {$elsec}
184 {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
185 {$endc}
186 {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
187 {$setc CALL_NOT_IN_CARBON := FALSE}
188 {$setc OLDROUTINENAMES := FALSE}
189 {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
190 {$setc OPAQUE_UPP_TYPES := TRUE}
191 {$setc OTCARBONAPPLICATION := TRUE}
192 {$setc OTKERNEL := FALSE}
193 {$setc PM_USE_SESSION_APIS := TRUE}
194 {$setc TARGET_API_MAC_CARBON := TRUE}
195 {$setc TARGET_API_MAC_OS8 := FALSE}
196 {$setc TARGET_API_MAC_OSX := TRUE}
197 {$setc TARGET_CARBON := TRUE}
198 {$setc TARGET_CPU_68K := FALSE}
199 {$setc TARGET_CPU_MIPS := FALSE}
200 {$setc TARGET_CPU_SPARC := FALSE}
201 {$setc TARGET_OS_UNIX := FALSE}
202 {$setc TARGET_OS_WIN32 := FALSE}
203 {$setc TARGET_RT_MAC_68881 := FALSE}
204 {$setc TARGET_RT_MAC_CFM := FALSE}
205 {$setc TARGET_RT_MAC_MACHO := TRUE}
206 {$setc TYPED_FUNCTION_POINTERS := TRUE}
207 {$setc TYPE_BOOL := FALSE}
208 {$setc TYPE_EXTENDED := FALSE}
209 {$setc TYPE_LONGLONG := TRUE}
210 uses MacTypes,CFArray,CGBase,CFBase;
211 {$endc} {not MACOSALLINCLUDE}
212
213
214 {$ALIGN POWER}
215
216
217 {!
218 @header
219
220 Thread Safety Information
221
222 All functions in this header are thread safe unless otherwise specified.
223 }
224
225
226 { --------------------------------------------------------------------------- }
227 { Paragraph Style Types }
228 { --------------------------------------------------------------------------- }
229
230 type
231 CTParagraphStyleRef = ^__CTParagraphStyle; { an opaque type }
232 __CTParagraphStyle = record end;
233
234
235 {!
236 @function CTParagraphStyleGetTypeID
237 @abstract Returns the CFType of the paragraph style object
238 }
239
CTParagraphStyleGetTypeIDnull240 function CTParagraphStyleGetTypeID: CFTypeID; external name '_CTParagraphStyleGetTypeID';
241 (* CT_AVAILABLE_STARTING( __MAC_10_5, __IPHONE_3_2) *)
242
243
244 { --------------------------------------------------------------------------- }
245 { Paragraph Style Values }
246 { --------------------------------------------------------------------------- }
247
248 {!
249 @enum CTTextAlignment
250 @abstract These constants specify text alignment.
251
252 @constant kCTTextAlignmentLeft
253 Text is visually left-aligned.
254
255 @constant kCTTextAlignmentRight
256 Text is visually right-aligned.
257
258 @constant kCTTextAlignmentCenter
259 Text is visually center-aligned.
260
261 @constant kCTTextAlignmentJustified
262 Text is fully justified. The last line in a paragraph is
263 naturally aligned.
264
265 @constant kCTTextAlignmentNatural
266 Use the natural alignment of the text's script.
267 }
268
269 const
270 kCTTextAlignmentLeft = 0;
271 kCTTextAlignmentRight = 1;
272 kCTTextAlignmentCenter = 2;
273 kCTTextAlignmentJustified = 3;
274 kCTTextAlignmentNatural = 4;
275
276 kCTLeftTextAlignment = kCTTextAlignmentLeft;
277 kCTRightTextAlignment = kCTTextAlignmentRight;
278 kCTCenterTextAlignment = kCTTextAlignmentCenter;
279 kCTJustifiedTextAlignment = kCTTextAlignmentJustified;
280 kCTNaturalTextAlignment = kCTTextAlignmentNatural;
281 type
282 CTTextAlignment = UInt8;
283
284
285 {!
286 @enum CTLineBreakMode
287 @abstract These constants specify what happens when a line is too long for
288 its frame.
289
290 @constant kCTLineBreakByWordWrapping
291 Wrapping occurs at word boundaries, unless the word itself doesn't
292 fit on a single line.
293
294 @constant kCTLineBreakByCharWrapping
295 Wrapping occurs before the first character that doesn't fit.
296
297 @constant kCTLineBreakByClipping
298 Lines are simply not drawn past the edge of the frame.
299
300 @constant kCTLineBreakByTruncatingHead
301 Each line is displayed so that the end fits in the frame and the
302 missing text is indicated by some kind of ellipsis glyph.
303
304 @constant kCTLineBreakByTruncatingTail
305 Each line is displayed so that the beginning fits in the
306 container and the missing text is indicated by some kind of
307 ellipsis glyph.
308
309 @constant kCTLineBreakByTruncatingMiddle
310 Each line is displayed so that the beginning and end fit in the
311 container and the missing text is indicated by some kind of
312 ellipsis glyph in the middle.
313 }
314
315 const
316 kCTLineBreakByWordWrapping = 0;
317 kCTLineBreakByCharWrapping = 1;
318 kCTLineBreakByClipping = 2;
319 kCTLineBreakByTruncatingHead = 3;
320 kCTLineBreakByTruncatingTail = 4;
321 kCTLineBreakByTruncatingMiddle = 5;
322 type
323 CTLineBreakMode = UInt8;
324
325
326 {!
327 @enum CTWritingDirection
328 @abstract These constants specify the writing direction
329
330 @constant kCTWritingDirectionNatural
331 The writing direction is algorithmically determined
332 using the Unicode Bidirectional Algorithm rules P2 and P3.
333
334 @constant kCTWritingDirectionLeftToRight
335 The writing direction is left to right.
336
337 @constant kCTWritingDirectionRightToLeft
338 The writing direction is right to left.
339 }
340 const
341 kCTWritingDirectionNatural = -1;
342 kCTWritingDirectionLeftToRight = 0;
343 kCTWritingDirectionRightToLeft = 1;
344 type
345 CTWritingDirection = SInt8;
346
347
348 {!
349 @enum CTParagraphStyleSpecifier
350 @abstract These constants are used to query and modify the CTParagraphStyle
351 object.
352
353 @discussion Each specifier has a type and a default value associated with it.
354 The type must always be observed when setting or fetching the
355 value from the CTParagraphStyle object. In addition, some
356 specifiers affect the behavior of both the framesetter and
357 the typesetter, and others only affect the behavior of the
358 framesetter; this is also noted below.
359
360 @constant kCTParagraphStyleSpecifierAlignment
361 The text alignment. Natural text alignment is realized as
362 left or right alignment, depending on the line sweep direction
363 of the first script contained in the paragraph.
364
365 Type: CTTextAlignment
366 Default: kCTNaturalTextAlignment
367 Application: CTFramesetter
368
369
370 @constant kCTParagraphStyleSpecifierFirstLineHeadIndent
371 The distance in points from the leading margin of a frame to
372 the beginning of the paragraph's first line. This value is always
373 nonnegative.
374
375 Type: CGFloat
376 Default: 0.0
377 Application: CTFramesetter
378
379
380 @constant kCTParagraphStyleSpecifierHeadIndent
381 The distance in points from the leading margin of a text
382 container to the beginning of lines other than the first.
383 This value is always nonnegative.
384
385 Type: CGFloat
386 Default: 0.0
387 Application: CTFramesetter
388
389
390 @constant kCTParagraphStyleSpecifierTailIndent
391 The distance in points from the margin of a frame to the end of
392 lines. If positive, this value is the distance from the leading
393 margin (for example, the left margin in left-to-right text).
394 If 0 or negative, it's the distance from the trailing margin.
395
396 Type: CGFloat
397 Default: 0.0
398 Application: CTFramesetter
399
400
401 @constant kCTParagraphStyleSpecifierTabStops
402 The CTTextTab objects, sorted by location, that define the tab
403 stops for the paragraph style.
404
405 Type: CFArray of CTTextTabRef
406 Default: 12 left-aligned tabs, spaced by 28.0 points
407 Application: CTFramesetter, CTTypesetter
408
409
410 @constant kCTParagraphStyleSpecifierDefaultTabInterval
411 The document-wide default tab interval. Tabs after the last
412 specified by kCTParagraphStyleSpecifierTabStops are placed at
413 integer multiples of this distance (if positive).
414
415 Type: CGFloat
416 Default: 0.0
417 Application: CTFramesetter, CTTypesetter
418
419
420 @constant kCTParagraphStyleSpecifierLineBreakMode
421 The mode that should be used to break lines when laying out
422 the paragraph's text.
423
424 Type: CTLineBreakMode
425 Default: kCTLineBreakByWordWrapping
426 Application: CTFramesetter
427
428
429 @constant kCTParagraphStyleSpecifierLineHeightMultiple
430 The line height multiple. The natural line height of the
431 receiver is multiplied by this factor (if positive) before
432 being constrained by minimum and maximum line height.
433
434 Type: CGFloat
435 Default: 0.0
436 Application: CTFramesetter
437
438
439 @constant kCTParagraphStyleSpecifierMaximumLineHeight
440 The maximum height that any line in the frame will occupy,
441 regardless of the font size or size of any attached graphic.
442 Glyphs and graphics exceeding this height will overlap
443 neighboring lines. A maximum height of 0 implies
444 no line height limit. This value is always nonnegative.
445
446 Type: CGFloat
447 Default: 0.0
448 Application: CTFramesetter
449
450
451 @constant kCTParagraphStyleSpecifierMinimumLineHeight
452 The minimum height that any line in the frame will occupy,
453 regardless of the font size or size of any attached graphic.
454 This value is always nonnegative.
455
456 Type: CGFloat
457 Default: 0.0
458 Application: CTFramesetter
459
460
461 @constant kCTParagraphStyleSpecifierLineSpacing
462 Deprecated.
463 Use kCTParagraphStyleSpecifierMaximumLineSpacing, kCTParagraphStyleSpecifierMinimumLineSpacing,
464 and kCTParagraphStyleSpecifierLineSpacingAdjustment to control
465 space between lines.
466
467
468 @constant kCTParagraphStyleSpecifierParagraphSpacing
469 The space added at the end of the paragraph to separate it from
470 the following paragraph. This value is always nonnegative and is
471 determined by adding the previous paragraph's
472 kCTParagraphStyleSpecifierParagraphSpacing setting and the
473 current paragraph's kCTParagraphStyleSpecifierParagraphSpacingBefore
474 setting.
475
476 Type: CGFloat
477 Default: 0.0
478 Application: CTFramesetter
479
480
481 @constant kCTParagraphStyleSpecifierParagraphSpacingBefore
482 The distance between the paragraph's top and the beginning of
483 its text content.
484
485 Type: CGFloat
486 Default: 0.0
487 Application: CTFramesetter
488
489
490 @constant kCTParagraphStyleSpecifierBaseWritingDirection
491 The base writing direction of the lines.
492
493 Type: CTWritingDirection
494 Default: kCTWritingDirectionNatural
495 Application: CTFramesetter, CTTypesetter
496
497
498 @constant kCTParagraphStyleSpecifierMaximumLineSpacing
499 The maximum space in points between lines within the paragraph
500 (commonly known as leading). This value is always
501 nonnegative.
502
503 Type: CGFloat
504 Default: some large number.
505 Application: CTFramesetter
506
507
508 @constant kCTParagraphStyleSpecifierMinimumLineSpacing
509 The minimum space in points between lines within the paragraph
510 (commonly known as leading). This value is always
511 nonnegative.
512
513 Type: CGFloat
514 Default: 0.0
515 Application: CTFramesetter
516
517
518 @constant kCTParagraphStyleSpecifierLineSpacingAdjustment
519 The space in points added between lines within the paragraph
520 (commonly known as leading).
521
522 Type: CGFloat
523 Default: 0.0
524 Application: CTFramesetter
525
526
527 @constant kCTParagraphStyleSpecifierLineBoundsOptions
528 The options controlling the alignment of the line edges with
529 the leading and trailing margins.
530
531 Type: CTLineBoundsOptions
532 Default: 0 (no options)
533 Application: CTTypesetter
534 }
535
536 const
537 kCTParagraphStyleSpecifierAlignment = 0;
538 kCTParagraphStyleSpecifierFirstLineHeadIndent = 1;
539 kCTParagraphStyleSpecifierHeadIndent = 2;
540 kCTParagraphStyleSpecifierTailIndent = 3;
541 kCTParagraphStyleSpecifierTabStops = 4;
542 kCTParagraphStyleSpecifierDefaultTabInterval = 5;
543 kCTParagraphStyleSpecifierLineBreakMode = 6;
544 kCTParagraphStyleSpecifierLineHeightMultiple = 7;
545 kCTParagraphStyleSpecifierMaximumLineHeight = 8;
546 kCTParagraphStyleSpecifierMinimumLineHeight = 9;
547 kCTParagraphStyleSpecifierLineSpacing = 10;
548 kCTParagraphStyleSpecifierParagraphSpacing = 11;
549 kCTParagraphStyleSpecifierParagraphSpacingBefore = 12;
550 kCTParagraphStyleSpecifierBaseWritingDirection = 13;
551 kCTParagraphStyleSpecifierCount = 14;
552 kCTParagraphStyleSpecifierMinimumLineSpacing = 15;
553 kCTParagraphStyleSpecifierLineSpacingAdjustment = 16;
554 kCTParagraphStyleSpecifierLineBoundsOptions = 17;
555 type
556 CTParagraphStyleSpecifier = UInt32;
557
558
559 {!
560 @struct CTParagraphStyleSetting
561 @abstract This structure is used to alter the paragraph style.
562
563 @field spec
564 The specifier of the setting.
565
566 @field valueSize
567 The size of the value pointed to by the "value" field. This
568 must match the size of the value required by the
569 CTParagraphStyleSpecifier set in the "spec" field.
570
571 @field value
572 A reference to the value of the setting specified by the
573 "spec" field. The value must be in the proper range for the
574 spec value. The value must also be at least valueSize.
575 }
576 type
577 CTParagraphStyleSettingPtr = ^CTParagraphStyleSetting;
578 CTParagraphStyleSetting = record
579 spec: CTParagraphStyleSpecifier;
580 {$ifc TARGET_CPU_64}
581 __alignment_dummy: UInt32;
582 {$endc}
583 valueSize: size_t;
584 value: {const} UnivPtr;
585 end;
586
587
588 { --------------------------------------------------------------------------- }
589 { Paragraph Style Creation }
590 { --------------------------------------------------------------------------- }
591
592 {!
593 @function CTParagraphStyleCreate
594 @abstract Creates an immutable paragraph style.
595
596 @discussion Using this function is the easiest and most efficient way to
597 create a paragraph style. Paragraph styles should be kept
598 immutable for totally lock-free operation.
599
600 If an invalid paragraph style setting specifier is passed into
601 the "settings" parameter, nothing bad will happen but just don't
602 expect to be able to query for this value. This is to allow
603 backwards compatibility with style setting specifiers that may
604 be introduced in future versions.
605
606 @param settings
607 The settings that you wish to pre-load the paragraph style
608 with. If you wish to specify the default set of settings,
609 then this parameter may be set to NULL.
610
611 @param settingCount
612 The number of settings that you have specified in the
613 "settings" parameter. This must be greater than or equal
614 to zero.
615
616 @result If the paragraph style creation was successful, this function
617 will return a valid reference to an immutable CTParagraphStyle
618 object. Otherwise, this function will return NULL.
619 }
620
CTParagraphStyleCreatenull621 function CTParagraphStyleCreate( settings: {const} CTParagraphStyleSettingPtr {can be null}; settingCount: size_t ): CTParagraphStyleRef; external name '_CTParagraphStyleCreate';
622 (* CT_AVAILABLE_STARTING( __MAC_10_5, __IPHONE_3_2) *)
623
624
625 {!
626 @function CTParagraphStyleCreateCopy
627 @abstract Creates an immutable copy of a paragraph style.
628
629 @param paragraphStyle
630 The style that you wish to copy. This parameter may not be
631 set to NULL.
632
633 @result If the "paragraphStyle" reference is valid, then this
634 function will return valid reference to an immutable
635 CTParagraphStyle object that is a copy of the one passed into
636 "paragraphStyle".
637 }
638
CTParagraphStyleCreateCopynull639 function CTParagraphStyleCreateCopy( paragraphStyle: CTParagraphStyleRef ): CTParagraphStyleRef; external name '_CTParagraphStyleCreateCopy';
640 (* CT_AVAILABLE_STARTING( __MAC_10_5, __IPHONE_3_2) *)
641
642
643 { --------------------------------------------------------------------------- }
644 { Paragraph Style Access }
645 { --------------------------------------------------------------------------- }
646
647 {!
648 @function CTParagraphStyleGetValueForSpecifier
649 @abstract Obtains the current value for a single setting specifier.
650
651 @discussion This function will return the current value of the specifier
652 whether or not the user had actually set it. If the user has
653 not set it, this function will return the default value.
654
655 If an invalid paragraph style setting specifier is passed into
656 the "spec" parameter, nothing bad will happen and the buffer
657 value will simply be zeroed out. This is to allow backwards
658 compatibility with style setting specifier that may be introduced
659 in future versions.
660
661 @param paragraphStyle
662 The paragraph style that you wish to get the value from. This
663 parameter may not be set to NULL.
664
665 @param spec
666 The setting specifier that you want to get the value for.
667
668 @param valueBufferSize
669 The size of the buffer pointed to by the "valueBuffer" parameter.
670 This value must be at least as large as the size the required by
671 the CTParagraphSpecifier value set in the "spec" parameter.
672
673 @param valueBuffer
674 The buffer where the requested setting value will be written
675 upon successful completion. The buffer's size needs to be at least
676 as large as the value passed into "valueBufferSize". This parameter
677 is required and may not be set to NULL.
678
679 @result This function will return "true" if the valueBuffer had been
680 successfully filled. Otherwise, this function will return false,
681 indicating that one or more of the parameters is not valid.
682 }
683
CTParagraphStyleGetValueForSpecifiernull684 function CTParagraphStyleGetValueForSpecifier( paragraphStyle: CTParagraphStyleRef; spec: CTParagraphStyleSpecifier; valueBufferSize: size_t; valueBuffer: UnivPtr ): CBool; external name '_CTParagraphStyleGetValueForSpecifier';
685 (* CT_AVAILABLE_STARTING( __MAC_10_5, __IPHONE_3_2) *)
686
687 {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
688
689 end.
690 {$endc} {not MACOSALLINCLUDE}
691