NSAttributedString.inc 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. { Parsed from Appkit.framework NSAttributedString.h }
  2. { Version: 2.1.5 - Fri Feb 11 21:45:55 CET 2011 }
  3. {$ifdef TYPES}
  4. {$ifndef NSATTRIBUTEDSTRING_PAS_T}
  5. {$define NSATTRIBUTEDSTRING_PAS_T}
  6. { Constants }
  7. const
  8. NSUnderlineStyleNone = $00;
  9. NSUnderlineStyleSingle = $01;
  10. NSUnderlineStyleThick = $02;
  11. NSUnderlineStyleDouble = $09;
  12. const
  13. NSUnderlinePatternSolid = $0000;
  14. NSUnderlinePatternDot = $0100;
  15. NSUnderlinePatternDash = $0200;
  16. NSUnderlinePatternDashDot = $0300;
  17. NSUnderlinePatternDashDotDot = $0400;
  18. const
  19. NSSpellingStateSpellingFlag = 1 shl 0;
  20. NSSpellingStateGrammarFlag = 1 shl 1;
  21. const
  22. NSNoUnderlineStyle = 0;
  23. NSSingleUnderlineStyle = 0;
  24. {$endif}
  25. {$endif}
  26. {$ifdef RECORDS}
  27. {$ifndef NSATTRIBUTEDSTRING_PAS_R}
  28. {$define NSATTRIBUTEDSTRING_PAS_R}
  29. {$endif}
  30. {$endif}
  31. {$ifdef FUNCTIONS}
  32. {$ifndef NSATTRIBUTEDSTRING_PAS_F}
  33. {$define NSATTRIBUTEDSTRING_PAS_F}
  34. {$endif}
  35. {$endif}
  36. {$ifdef EXTERNAL_SYMBOLS}
  37. {$ifndef NSATTRIBUTEDSTRING_PAS_S}
  38. {$define NSATTRIBUTEDSTRING_PAS_S}
  39. { External string constants }
  40. var
  41. NSFontAttributeName: NSString; cvar; external;
  42. NSParagraphStyleAttributeName: NSString; cvar; external;
  43. NSForegroundColorAttributeName: NSString; cvar; external;
  44. NSUnderlineStyleAttributeName: NSString; cvar; external;
  45. NSSuperscriptAttributeName: NSString; cvar; external;
  46. NSBackgroundColorAttributeName: NSString; cvar; external;
  47. NSAttachmentAttributeName: NSString; cvar; external;
  48. NSLigatureAttributeName: NSString; cvar; external;
  49. NSBaselineOffsetAttributeName: NSString; cvar; external;
  50. NSKernAttributeName: NSString; cvar; external;
  51. NSLinkAttributeName: NSString; cvar; external;
  52. NSStrokeWidthAttributeName: NSString; cvar; external;
  53. NSStrokeColorAttributeName: NSString; cvar; external;
  54. NSUnderlineColorAttributeName: NSString; cvar; external;
  55. NSStrikethroughStyleAttributeName: NSString; cvar; external;
  56. NSStrikethroughColorAttributeName: NSString; cvar; external;
  57. NSShadowAttributeName: NSString; cvar; external;
  58. NSObliquenessAttributeName: NSString; cvar; external;
  59. NSExpansionAttributeName: NSString; cvar; external;
  60. NSCursorAttributeName: NSString; cvar; external;
  61. NSToolTipAttributeName: NSString; cvar; external;
  62. NSCharacterShapeAttributeName: NSString; cvar; external;
  63. NSGlyphInfoAttributeName: NSString; cvar; external;
  64. NSWritingDirectionAttributeName: NSString; cvar; external;
  65. NSMarkedClauseSegmentAttributeName: NSString; cvar; external;
  66. NSSpellingStateAttributeName: NSString; cvar; external;
  67. NSPlainTextDocumentType: NSString; cvar; external;
  68. NSRTFTextDocumentType: NSString; cvar; external;
  69. NSRTFDTextDocumentType: NSString; cvar; external;
  70. NSMacSimpleTextDocumentType: NSString; cvar; external;
  71. NSHTMLTextDocumentType: NSString; cvar; external;
  72. NSDocFormatTextDocumentType: NSString; cvar; external;
  73. NSWordMLTextDocumentType: NSString; cvar; external;
  74. NSWebArchiveTextDocumentType: NSString; cvar; external;
  75. NSOfficeOpenXMLTextDocumentType: NSString; cvar; external;
  76. NSOpenDocumentTextDocumentType: NSString; cvar; external;
  77. NSPaperSizeDocumentAttribute: NSString; cvar; external;
  78. NSLeftMarginDocumentAttribute: NSString; cvar; external;
  79. NSRightMarginDocumentAttribute: NSString; cvar; external;
  80. NSTopMarginDocumentAttribute: NSString; cvar; external;
  81. NSBottomMarginDocumentAttribute: NSString; cvar; external;
  82. NSViewSizeDocumentAttribute: NSString; cvar; external;
  83. NSViewZoomDocumentAttribute: NSString; cvar; external;
  84. NSViewModeDocumentAttribute: NSString; cvar; external;
  85. NSDocumentTypeDocumentAttribute: NSString; cvar; external;
  86. NSReadOnlyDocumentAttribute: NSString; cvar; external;
  87. NSConvertedDocumentAttribute: NSString; cvar; external;
  88. NSCocoaVersionDocumentAttribute: NSString; cvar; external;
  89. NSBackgroundColorDocumentAttribute: NSString; cvar; external;
  90. NSHyphenationFactorDocumentAttribute: NSString; cvar; external;
  91. NSDefaultTabIntervalDocumentAttribute: NSString; cvar; external;
  92. NSCharacterEncodingDocumentAttribute: NSString; cvar; external;
  93. NSFileTypeDocumentAttribute: NSString; cvar; external;
  94. NSTitleDocumentAttribute: NSString; cvar; external;
  95. NSCompanyDocumentAttribute: NSString; cvar; external;
  96. NSCopyrightDocumentAttribute: NSString; cvar; external;
  97. NSSubjectDocumentAttribute: NSString; cvar; external;
  98. NSAuthorDocumentAttribute: NSString; cvar; external;
  99. NSKeywordsDocumentAttribute: NSString; cvar; external;
  100. NSCommentDocumentAttribute: NSString; cvar; external;
  101. NSEditorDocumentAttribute: NSString; cvar; external;
  102. NSCreationTimeDocumentAttribute: NSString; cvar; external;
  103. NSModificationTimeDocumentAttribute: NSString; cvar; external;
  104. NSManagerDocumentAttribute: NSString; cvar; external;
  105. NSCategoryDocumentAttribute: NSString; cvar; external;
  106. NSExcludedElementsDocumentAttribute: NSString; cvar; external;
  107. NSTextEncodingNameDocumentAttribute: NSString; cvar; external;
  108. NSPrefixSpacesDocumentAttribute: NSString; cvar; external;
  109. NSDocumentTypeDocumentOption: NSString; cvar; external;
  110. NSDefaultAttributesDocumentOption: NSString; cvar; external;
  111. NSCharacterEncodingDocumentOption: NSString; cvar; external;
  112. NSTextEncodingNameDocumentOption: NSString; cvar; external;
  113. NSBaseURLDocumentOption: NSString; cvar; external;
  114. NSTimeoutDocumentOption: NSString; cvar; external;
  115. NSWebPreferencesDocumentOption: NSString; cvar; external;
  116. NSWebResourceLoadDelegateDocumentOption: NSString; cvar; external;
  117. NSTextSizeMultiplierDocumentOption: NSString; cvar; external;
  118. NSFileTypeDocumentOption: NSString; cvar; external;
  119. { External symbols }
  120. var
  121. NSUnderlineByWordMask: NSUInteger; cvar; external;
  122. NSUnderlineStrikethroughMask: NSUInteger; cvar; external;
  123. {$endif}
  124. {$endif}
  125. {$ifdef FORWARD}
  126. NSAttributedString = objcclass;
  127. NSAttributedStringPointer = ^NSAttributedString;
  128. NSAttributedStringPtr = NSAttributedStringPointer;
  129. NSMutableAttributedString = objcclass;
  130. NSMutableAttributedStringPointer = ^NSMutableAttributedString;
  131. NSMutableAttributedStringPtr = NSMutableAttributedStringPointer;
  132. {$endif}
  133. {$ifdef CLASSES}
  134. {$ifndef NSATTRIBUTEDSTRING_PAS_C}
  135. {$define NSATTRIBUTEDSTRING_PAS_C}
  136. { NSAttributedString }
  137. NSAttributedString = objcclass external (NSObject, NSCopyingProtocol, NSMutableCopyingProtocol, NSCodingProtocol)
  138. public
  139. function string_: NSString; message 'string';
  140. function attributesAtIndex_effectiveRange(location: NSUInteger; range: NSRangePointer): NSDictionary; message 'attributesAtIndex:effectiveRange:';
  141. { Adopted Protocols }
  142. function copyWithZone(zone_: NSZonePtr): id;
  143. function mutableCopyWithZone(zone_: NSZonePtr): id;
  144. procedure encodeWithCoder(aCoder: NSCoder);
  145. function initWithCoder(aDecoder: NSCoder): id;
  146. end;
  147. { NSMutableAttributedString }
  148. NSMutableAttributedString = objcclass external (NSAttributedString)
  149. public
  150. procedure replaceCharactersInRange_withString(range: NSRange; str: NSString); message 'replaceCharactersInRange:withString:';
  151. procedure setAttributes_range(attrs: NSDictionary; range: NSRange); message 'setAttributes:range:';
  152. end;
  153. { NSExtendedAttributedStringCategory }
  154. NSExtendedAttributedStringCategory = objccategory external (NSAttributedString)
  155. function length: NSUInteger; message 'length';
  156. function attribute_atIndex_effectiveRange(attrName: NSString; location: NSUInteger; range: NSRangePointer): id; message 'attribute:atIndex:effectiveRange:';
  157. function attributedSubstringFromRange(range: NSRange): NSAttributedString; message 'attributedSubstringFromRange:';
  158. function attributesAtIndex_longestEffectiveRange_inRange(location: NSUInteger; range: NSRangePointer; rangeLimit: NSRange): NSDictionary; message 'attributesAtIndex:longestEffectiveRange:inRange:';
  159. function attribute_atIndex_longestEffectiveRange_inRange(attrName: NSString; location: NSUInteger; range: NSRangePointer; rangeLimit: NSRange): id; message 'attribute:atIndex:longestEffectiveRange:inRange:';
  160. function isEqualToAttributedString(other: NSAttributedString): Boolean; message 'isEqualToAttributedString:';
  161. function initWithString(str: NSString): id; message 'initWithString:';
  162. function initWithString_attributes(str: NSString; attrs: NSDictionary): id; message 'initWithString:attributes:';
  163. function initWithAttributedString(attrStr: NSAttributedString): id; message 'initWithAttributedString:';
  164. end;
  165. { NSExtendedMutableAttributedStringCategory }
  166. NSExtendedMutableAttributedStringCategory = objccategory external (NSMutableAttributedString)
  167. function mutableString: NSMutableString; message 'mutableString';
  168. procedure addAttribute_value_range(name: NSString; value: id; range: NSRange); message 'addAttribute:value:range:';
  169. procedure addAttributes_range(attrs: NSDictionary; range: NSRange); message 'addAttributes:range:';
  170. procedure removeAttribute_range(name: NSString; range: NSRange); message 'removeAttribute:range:';
  171. procedure replaceCharactersInRange_withAttributedString(range: NSRange; attrString: NSAttributedString); message 'replaceCharactersInRange:withAttributedString:';
  172. procedure insertAttributedString_atIndex(attrString: NSAttributedString; loc: NSUInteger); message 'insertAttributedString:atIndex:';
  173. procedure appendAttributedString(attrString: NSAttributedString); message 'appendAttributedString:';
  174. procedure deleteCharactersInRange(range: NSRange); message 'deleteCharactersInRange:';
  175. procedure setAttributedString(attrString: NSAttributedString); message 'setAttributedString:';
  176. procedure beginEditing; message 'beginEditing';
  177. procedure endEditing; message 'endEditing';
  178. end;
  179. { NSAttributedStringKitAdditionsCategory }
  180. NSAttributedStringKitAdditionsCategory = objccategory external (NSAttributedString)
  181. function fontAttributesInRange(range: NSRange): NSDictionary; message 'fontAttributesInRange:';
  182. function rulerAttributesInRange(range: NSRange): NSDictionary; message 'rulerAttributesInRange:';
  183. function containsAttachments: Boolean; message 'containsAttachments';
  184. function lineBreakBeforeIndex_withinRange(location: NSUInteger; aRange: NSRange): NSUInteger; message 'lineBreakBeforeIndex:withinRange:';
  185. function lineBreakByHyphenatingBeforeIndex_withinRange(location: NSUInteger; aRange: NSRange): NSUInteger; message 'lineBreakByHyphenatingBeforeIndex:withinRange:';
  186. function doubleClickAtIndex(location: NSUInteger): NSRange; message 'doubleClickAtIndex:';
  187. function nextWordFromIndex_forward(location: NSUInteger; isForward: Boolean): NSUInteger; message 'nextWordFromIndex:forward:';
  188. function URLAtIndex_effectiveRange(location: NSUInteger; effectiveRange: NSRangePointer): NSURL; message 'URLAtIndex:effectiveRange:';
  189. class function textTypes: NSArray; message 'textTypes';
  190. class function textUnfilteredTypes: NSArray; message 'textUnfilteredTypes';
  191. function rangeOfTextBlock_atIndex(block: NSTextBlock; location: NSUInteger): NSRange; message 'rangeOfTextBlock:atIndex:';
  192. function rangeOfTextTable_atIndex(table: NSTextTable; location: NSUInteger): NSRange; message 'rangeOfTextTable:atIndex:';
  193. function rangeOfTextList_atIndex(list: NSTextList; location: NSUInteger): NSRange; message 'rangeOfTextList:atIndex:';
  194. function itemNumberInTextList_atIndex(list: NSTextList; location: NSUInteger): NSInteger; message 'itemNumberInTextList:atIndex:';
  195. function initWithURL_options_documentAttributes_error(url: NSURL; options: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): id; message 'initWithURL:options:documentAttributes:error:';
  196. function initWithData_options_documentAttributes_error(data: NSData; options: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): id; message 'initWithData:options:documentAttributes:error:';
  197. function initWithPath_documentAttributes(path: NSString; dict: NSDictionaryPointer): id; message 'initWithPath:documentAttributes:';
  198. function initWithURL_documentAttributes(url: NSURL; dict: NSDictionaryPointer): id; message 'initWithURL:documentAttributes:';
  199. function initWithRTF_documentAttributes(data: NSData; dict: NSDictionaryPointer): id; message 'initWithRTF:documentAttributes:';
  200. function initWithRTFD_documentAttributes(data: NSData; dict: NSDictionaryPointer): id; message 'initWithRTFD:documentAttributes:';
  201. function initWithHTML_documentAttributes(data: NSData; dict: NSDictionaryPointer): id; message 'initWithHTML:documentAttributes:';
  202. function initWithHTML_baseURL_documentAttributes(data: NSData; base: NSURL; dict: NSDictionaryPointer): id; message 'initWithHTML:baseURL:documentAttributes:';
  203. function initWithDocFormat_documentAttributes(data: NSData; dict: NSDictionaryPointer): id; message 'initWithDocFormat:documentAttributes:';
  204. function initWithHTML_options_documentAttributes(data: NSData; options: NSDictionary; dict: NSDictionaryPointer): id; message 'initWithHTML:options:documentAttributes:';
  205. function initWithRTFDFileWrapper_documentAttributes(wrapper: NSFileWrapper; dict: NSDictionaryPointer): id; message 'initWithRTFDFileWrapper:documentAttributes:';
  206. function dataFromRange_documentAttributes_error(range: NSRange; dict: NSDictionary; error: NSErrorPointer): NSData; message 'dataFromRange:documentAttributes:error:';
  207. function fileWrapperFromRange_documentAttributes_error(range: NSRange; dict: NSDictionary; error: NSErrorPointer): NSFileWrapper; message 'fileWrapperFromRange:documentAttributes:error:';
  208. function RTFFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSData; message 'RTFFromRange:documentAttributes:';
  209. function RTFDFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSData; message 'RTFDFromRange:documentAttributes:';
  210. function RTFDFileWrapperFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSFileWrapper; message 'RTFDFileWrapperFromRange:documentAttributes:';
  211. function docFormatFromRange_documentAttributes(range: NSRange; dict: NSDictionary): NSData; message 'docFormatFromRange:documentAttributes:';
  212. end;
  213. { NSDeprecatedKitAdditionsCategory }
  214. NSDeprecatedKitAdditionsCategory = objccategory external (NSAttributedString)
  215. class function textFileTypes: NSArray; message 'textFileTypes'; deprecated 'in Mac OS X 10.5 and later';
  216. class function textPasteboardTypes: NSArray; message 'textPasteboardTypes'; deprecated 'in Mac OS X 10.5 and later';
  217. class function textUnfilteredFileTypes: NSArray; message 'textUnfilteredFileTypes'; deprecated 'in Mac OS X 10.5 and later';
  218. class function textUnfilteredPasteboardTypes: NSArray; message 'textUnfilteredPasteboardTypes'; deprecated 'in Mac OS X 10.5 and later';
  219. end;
  220. { NSMutableAttributedStringKitAdditionsCategory }
  221. NSMutableAttributedStringKitAdditionsCategory = objccategory external (NSMutableAttributedString)
  222. function readFromURL_options_documentAttributes_error(url: NSURL; opts: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): Boolean; message 'readFromURL:options:documentAttributes:error:';
  223. function readFromData_options_documentAttributes_error(data: NSData; opts: NSDictionary; dict: NSDictionaryPointer; error: NSErrorPointer): Boolean; message 'readFromData:options:documentAttributes:error:';
  224. function readFromURL_options_documentAttributes(url: NSURL; options: NSDictionary; dict: NSDictionaryPointer): Boolean; message 'readFromURL:options:documentAttributes:';
  225. function readFromData_options_documentAttributes(data: NSData; options: NSDictionary; dict: NSDictionaryPointer): Boolean; message 'readFromData:options:documentAttributes:';
  226. procedure superscriptRange(range: NSRange); message 'superscriptRange:';
  227. procedure subscriptRange(range: NSRange); message 'subscriptRange:';
  228. procedure unscriptRange(range: NSRange); message 'unscriptRange:';
  229. procedure applyFontTraits_range(traitMask: NSFontTraitMask; range: NSRange); message 'applyFontTraits:range:';
  230. procedure setAlignment_range(alignment: NSTextAlignment; range: NSRange); message 'setAlignment:range:';
  231. procedure setBaseWritingDirection_range(writingDirection: NSWritingDirection; range: NSRange); message 'setBaseWritingDirection:range:';
  232. procedure fixAttributesInRange(range: NSRange); message 'fixAttributesInRange:';
  233. procedure fixFontAttributeInRange(range: NSRange); message 'fixFontAttributeInRange:';
  234. procedure fixParagraphStyleAttributeInRange(range: NSRange); message 'fixParagraphStyleAttributeInRange:';
  235. procedure fixAttachmentAttributeInRange(range: NSRange); message 'fixAttachmentAttributeInRange:';
  236. end;
  237. {$endif}
  238. {$endif}