home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / AppKit.framework / Versions / B / Headers / NSCStringText.h < prev    next >
Text File  |  1996-10-28  |  20KB  |  493 lines

  1. /*
  2.     NSCStringText.h
  3.     Application Kit
  4.     Copyright (c) 1994-1996, NeXT Software, Inc.
  5.     All rights reserved.
  6. */
  7.  
  8. #import <AppKit/NSText.h>
  9. #import <AppKit/NSEvent.h>
  10. #import <AppKit/NSColor.h>
  11. #import <AppKit/NSFontManager.h>
  12. #import <AppKit/NSSpellChecker.h>
  13. #import <AppKit/AppKitDefines.h>
  14. #import <AppKit/dpsclient.h>
  15.  
  16. enum {
  17.     NSTextBlockSize            = 512
  18. };
  19.  
  20. /* NSTextChunks implement variable sized arrays of records.  Allocation is by the given size (in bytes) -- typically a multiple number of records, say 10. The block of memory never shrinks, and the chunk records the current number of elements.  To use the NSTextChunks, you declare a struct w/ NSTextChunks as its first field.
  21. */
  22. typedef struct _NSTextChunk {
  23.     short           growby;    /* increment to grow by */
  24.     int             allocated;    /* how much is allocated */
  25.     int             used;    /* how much is used */
  26. } NSTextChunk;
  27.  
  28. typedef struct _NSTextBlock {
  29.     struct _NSTextBlock *next;        /* next text block in link list */
  30.     struct _NSTextBlock *prior;        /* previous text block in link list */
  31.     struct _tbFlags {
  32.     unsigned int    malloced:1;    /* true if block was malloced */
  33.     unsigned int    PAD:15;
  34.     } tbFlags;
  35.     short           chars;        /* number of chars in this block */
  36.     unsigned char  *text;        /* the text */
  37. } NSTextBlock;
  38.  
  39. /* NSRun represents a single run of text w/ a given format
  40. */
  41.   typedef struct {
  42.     unsigned int underline:1;
  43.     unsigned int dummy:1;        /* unused */
  44.     unsigned int subclassWantsRTF:1;
  45.     unsigned int graphic:1;
  46.     unsigned int forcedSymbol:1;    /* did alt-char force use to use symbol */
  47.     unsigned int RESERVED:11;
  48. } NSRunFlags;
  49.  
  50. typedef struct _NSRun {
  51.     id              font;    /* Font id */
  52.     int             chars;    /* number of chars in run */
  53.     void           *paraStyle;    /* implementation dependent paraStyle
  54.                  * sheet info. */
  55.     int            textRGBColor;    /* text color */
  56.     unsigned char   superscript;/* superscript in points */
  57.     unsigned char   subscript;    /* subscript in points */
  58.     id          info;    /* available for subclasses of Text */
  59.     NSRunFlags rFlags;
  60. } NSRun;
  61.  
  62. /* NSRunArray is a NSTextChunk that holds the set of formats for a Text object
  63. */
  64.  
  65. typedef struct _NSRunArray {
  66.     NSTextChunk chunk;
  67.     NSRun runs[1];
  68. } NSRunArray;
  69.  
  70. /* NSBreakArray is a NSTextChunk that holds line break information for a Text Object. it is mostly an array of line descriptors.  each line descriptor contains 3 fields: 
  71.  1) line change bit (sign bit), set if this line defines a new height 
  72.  2) paragraph end bit (next to sign bit), set if the end of this line ends the paragraph 
  73.  3) numbers of characters in the line (low order 14 bits) 
  74. if the line change bit is set, the descriptor is the first field of a NSHeightChange. since this record is bracketed by negative short values, the breaks array can be sequentially accessed backwards and forwards. 
  75. */
  76. #if m68k
  77. typedef short NSLineDesc;
  78. #else
  79. typedef    int NSLineDesc;
  80. #endif
  81.  
  82. typedef struct _NSHeightInfo {
  83.     float         newHeight;    /* line height from here forward */
  84.     float         oldHeight;    /* height before change */
  85.     NSLineDesc      lineDesc;    /* line descriptor */
  86. } NSHeightInfo;
  87.  
  88. typedef struct _NSHeightChange {
  89.     NSLineDesc      lineDesc;    /* line descriptor */
  90.     NSHeightInfo    heightInfo;
  91. } NSHeightChange;
  92.  
  93. typedef struct _NSBreakArray {
  94.     NSTextChunk         chunk;
  95.     NSLineDesc      breaks[1];
  96. } NSBreakArray;
  97.  
  98. /* NSLay represents a single run of text in a line and records everything needed to select or draw that piece.
  99. */
  100. typedef struct {
  101.     unsigned int mustMove:1;    /* unimplemented */
  102.     unsigned int isMoveChar:1;
  103.     unsigned int RESERVED:14;
  104. } NSLayFlags;
  105.  
  106. typedef struct _NSLay {
  107.     float         x;        /* x coordinate of moveto */
  108.     float         y;        /* y coordinate of moveto */
  109.     short           offset;    /* offset in line array for text */
  110.     short           chars;    /* number of characters in lay */
  111.     id              font;    /* font id */
  112.     void           *paraStyle;    /* implementation dependent fontStyle
  113.                  * sheet info. */
  114.     NSRun *run;            /* run for lay */
  115.     NSLayFlags        lFlags;
  116. } NSLay;
  117.  
  118. /* NSLayArray is a NSTextChunk that holds the layout for the current line
  119. */
  120. typedef struct _NSLayArray {
  121.     NSTextChunk chunk;
  122.     NSLay lays[1];
  123. } NSLayArray;
  124.  
  125. /* NSWidthArray is a NSTextChunk that holds the widths for the current line
  126. */
  127. typedef struct _NSWidthArray {
  128.     NSTextChunk chunk;
  129.     float widths[1];
  130. } NSWidthArray;
  131.  
  132. /* NSCharArray is a NSTextChunk that holds the chars for the current line
  133. */
  134. typedef struct _NSCharArray {
  135.     NSTextChunk chunk;
  136.     unsigned char text[1];
  137. } NSCharArray;
  138.  
  139. /* Word definition Finite State Machine transition struct
  140. */
  141. typedef struct _NSFSM {
  142.     const struct _NSFSM  *next;    /* state to go to, NULL implies final state */
  143.     short           delta;    /* if final state, this undoes lookahead */
  144.     short           token;    /* if final state, < 0 word is newline,
  145.                  * = is dark, > is white space */
  146. } NSFSM;
  147.  
  148. /* Represents one end of a selection
  149. */
  150. typedef struct _NSSelPt {
  151.     int             cp;        /* character position */
  152.     int             line;    /* offset of LineDesc in break table */
  153.     float         x;        /* x coordinate */
  154.     float         y;        /* y coordinate */
  155.     int             c1st;    /* character position of first character
  156.                  * on the line */
  157.     float         ht;        /* line height */
  158. } NSSelPt;
  159.  
  160. typedef struct _NSTabStop {
  161.     short           kind;    /* only NSLeftTab implemented*/
  162.     float         x;        /* x coordinate for stop */
  163. } NSTabStop;
  164.  
  165. typedef struct _NSTextCache {
  166.     int curPos;            /* current position in text stream */
  167.     NSRun *curRun;        /* cache current block of text and */
  168.     int runFirstPos;        /* character pos that corresponds */
  169.     NSTextBlock *curBlock;    /* cache current block of text and */
  170.     int blockFirstPos;        /* character pos that corresponds */
  171. } NSTextCache;
  172.  
  173. typedef struct _NSLayInfo {
  174.     NSRect rect;        /* bounds rect for current line. */
  175.     float descent;        /* descent for current line, can be reset
  176.                  * by scanFunc */
  177.     float width;        /* width of line */
  178.     float left;        /* left side visible coordinate */
  179.     float right;        /* right side visible coordinate */
  180.     float rightIndent;    /* how much white space is left at right
  181.                  * side of line */
  182.     NSLayArray *lays;        /* scanFunc fills with NSLay items */
  183.     NSWidthArray *widths;    /* scanFunc fills with character widths */
  184.     NSCharArray *chars;        /* scanFunc fills with characters */
  185.     NSTextCache cache;        /* cache of current block & run */
  186.     NSRect *textClipRect;    /* if non-nil, the current clip for drawing */
  187.     struct _lFlags {
  188.     unsigned int horizCanGrow:1;/* 1 if scanFunc should perform dynamic
  189.                  * growing of x margins */
  190.     unsigned int vertCanGrow:1;/* 1 if scanFunc should perform dynamic
  191.                  * growing of y margins */
  192.     unsigned int erase:1;    /* used to tell drawFunc to erase before
  193.                  * drawing line  */
  194.     unsigned int ping:1;    /* used to tell drawFunc to ping server */
  195.     unsigned int endsParagraph:1;/* true if line ends the paragraph, eg
  196.                  * ends in newline */
  197.     unsigned int resetCache:1;/* used in scanFunc to reset local caches */
  198.     unsigned int RESERVED:10;
  199.     } lFlags;
  200. } NSLayInfo;
  201.  
  202. typedef struct _NSTextStyle {
  203.     float         indent1st;    /* how far first line in paragraph is
  204.                  * indented */
  205.     float         indent2nd;    /* how far second line is indented */
  206.     float         lineHt;    /* line height */
  207.     float         descentLine;    /* distance to ascent line from bottom of line */
  208.     NSTextAlignment      alignment;    /* justification */
  209.     short           numTabs;    /* number of tab stops */
  210.     NSTabStop      *tabs;    /* array of tab stops */
  211. } NSTextStyle;
  212.  
  213. enum {
  214.     NSLeftTab = 0
  215. };
  216.  
  217. enum {
  218.     NSBackspaceKey            = 8,
  219.     NSCarriageReturnKey            = 13,
  220.     NSDeleteKey                = 0x7f,
  221.     NSBacktabKey            = 25
  222. };
  223.  
  224. typedef enum _NSParagraphProperty {
  225.     NSLeftAlignedParagraph        = NSLeftTextAlignment,
  226.     NSRightAlignedParagraph        = NSRightTextAlignment,
  227.     NSCenterAlignedParagraph        = NSCenterTextAlignment,
  228.     NSJustificationAlignedParagraph    = NSJustifiedTextAlignment,
  229.     NSFirstIndentParagraph        = 4,
  230.     NSIndentParagraph            = 5,
  231.     NSAddTabParagraph            = 6,
  232.     NSRemoveTabParagraph        = 7,
  233.     NSLeftMarginParagraph        = 8,
  234.     NSRightMarginParagraph        = 9
  235. } NSParagraphProperty;
  236.  
  237.  
  238. /* Word tables for various languages.  The SmartLeft and SmartRight arrays are suitable as arguments for the messages setPreSelSmartTable: and setPostSelSmartTable.  When doing a paste, if the character to the left (right) of the new word is not in the left (right) table, an extra space is added on that side.  The CharCats tables define the character classes used in the word wrap or click tables.  The BreakTables are finite state machines that determine word wrapping.  The ClickTables are finite state machines that determine which characters are selected when the user double clicks.
  239. */
  240. APPKIT_EXTERN const unsigned char *NSEnglishSmartLeftChars;
  241. APPKIT_EXTERN const unsigned char *NSEnglishSmartRightChars;
  242. APPKIT_EXTERN const unsigned char *NSEnglishCharCatTable;
  243. APPKIT_EXTERN const NSFSM *NSEnglishBreakTable;
  244. APPKIT_EXTERN int NSEnglishBreakTableSize;
  245. APPKIT_EXTERN const NSFSM *NSEnglishNoBreakTable;
  246. APPKIT_EXTERN int NSEnglishNoBreakTableSize;
  247. APPKIT_EXTERN const NSFSM *NSEnglishClickTable;
  248. APPKIT_EXTERN int NSEnglishClickTableSize;
  249.  
  250. APPKIT_EXTERN const unsigned char *NSCSmartLeftChars;
  251. APPKIT_EXTERN const unsigned char *NSCSmartRightChars;
  252. APPKIT_EXTERN const unsigned char *NSCCharCatTable;
  253. APPKIT_EXTERN const NSFSM *NSCBreakTable;
  254. APPKIT_EXTERN int NSCBreakTableSize;
  255. APPKIT_EXTERN const NSFSM *NSCClickTable;
  256. APPKIT_EXTERN int NSCClickTableSize;
  257.  
  258. typedef int (*NSTextFunc) (id self, NSLayInfo *layInfo);
  259. typedef unsigned short (*NSCharFilterFunc) (unsigned short charCode, int flags, NSStringEncoding theEncoding);
  260. typedef char  *(*NSTextFilterFunc) (id self, unsigned char * insertText, int *insertLength, int position);
  261.  
  262. @class NSEvent;
  263.  
  264. typedef struct _NSCStringTextInternalState  {
  265.     const NSFSM        *breakTable;
  266.     const NSFSM        *clickTable;
  267.     const unsigned char *preSelSmartTable;
  268.     const unsigned char *postSelSmartTable;
  269.     const unsigned char *charCategoryTable;
  270.     char                delegateMethods;
  271.     NSCharFilterFunc    charFilterFunc;
  272.     NSTextFilterFunc    textFilterFunc;
  273.     NSString           *_string;
  274.     NSTextFunc          scanFunc;
  275.     NSTextFunc          drawFunc;
  276.     id                  delegate;
  277.     int                 tag;
  278.     void           *cursorTE;
  279.     NSTextBlock        *firstTextBlock;
  280.     NSTextBlock        *lastTextBlock;
  281.     NSRunArray         *theRuns;
  282.     NSRun               typingRun;
  283.     NSBreakArray       *theBreaks;
  284.     int                 growLine;
  285.     int                 textLength;
  286.     float             maxY;
  287.     float             maxX;
  288.     NSRect              bodyRect;
  289.     float             borderWidth;
  290.     char                clickCount;
  291.     NSSelPt             sp0;
  292.     NSSelPt             spN;
  293.     NSSelPt             anchorL;
  294.     NSSelPt             anchorR;
  295.     NSSize              maxSize;
  296.     NSSize              minSize;
  297.     struct _tFlags {
  298. #ifdef __BIG_ENDIAN__
  299.     unsigned int        _editMode:2;
  300.     unsigned int        _selectMode:2;
  301.     unsigned int        _caretState:2;
  302.     unsigned int        changeState:1;
  303.     unsigned int        charWrap:1;
  304.     unsigned int        haveDown:1;
  305.     unsigned int        anchorIs0:1;
  306.     unsigned int        horizResizable:1;
  307.     unsigned int        vertResizable:1;
  308.     unsigned int        overstrikeDiacriticals:1;
  309.     unsigned int        monoFont:1;
  310.     unsigned int        disableFontPanel:1;
  311.     unsigned int        inClipView:1;
  312. #else
  313.     unsigned int        inClipView:1;
  314.     unsigned int        disableFontPanel:1;
  315.     unsigned int        monoFont:1;
  316.     unsigned int        overstrikeDiacriticals:1;
  317.     unsigned int        vertResizable:1;
  318.     unsigned int        horizResizable:1;
  319.     unsigned int        anchorIs0:1;
  320.     unsigned int        haveDown:1;
  321.     unsigned int        charWrap:1;
  322.     unsigned int        changeState:1;
  323.     unsigned int        _caretState:2;
  324.     unsigned int        _selectMode:2;
  325.     unsigned int        _editMode:2;
  326. #endif
  327.     }                   tFlags;
  328.     void               *_info;
  329.     void           *_textStr;
  330. }  NSCStringTextInternalState;
  331.  
  332. @interface NSCStringText : NSText
  333.  
  334. + excludeFromServicesMenu:(BOOL)flag;
  335. + (NSFont *)defaultFont;
  336. + (void)setDefaultFont:(NSFont *)anObject;
  337.  
  338. - (id)initWithFrame:(NSRect)frameRect text:(NSString *)theText alignment:(NSTextAlignment)mode;
  339.  
  340. - (NSCStringTextInternalState *)cStringTextInternalState;
  341.  
  342. - (void)renewRuns:(NSRunArray *)newRuns text:(NSString *)newText frame:(NSRect)newFrame tag:(int)newTag;
  343. - (void)renewFont:(NSFont *)newFontId text:(NSString *)newText frame:(NSRect)newFrame tag:(int)newTag;
  344. - (void)renewFont:(NSString *)newFontName size:(float)newFontSize style:(int)newFontStyle text:(NSString *)newText frame:(NSRect)newFrame tag:(int)newTag;
  345. - (void)adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
  346. - (NSRect)paragraphRect:(int)prNumber start:(int *)startPos end:(int *)endPos;
  347. - (void)setCharFilter:(NSCharFilterFunc)aFunc;
  348. - (NSCharFilterFunc)charFilter;
  349. - (void)setTextFilter:(NSTextFilterFunc)aFunc;
  350. - (NSTextFilterFunc)textFilter;
  351. - (const unsigned char *)preSelSmartTable;
  352. - (void)setPreSelSmartTable:(const unsigned char *)aTable;
  353. - (const unsigned char *)postSelSmartTable;
  354. - (void)setPostSelSmartTable:(const unsigned char *)aTable;
  355. - (const unsigned char *)charCategoryTable;
  356. - (void)setCharCategoryTable:(const unsigned char *)aTable;
  357. - (const NSFSM *)breakTable;
  358. - (void)setBreakTable:(const NSFSM *)aTable;
  359. - (const NSFSM *)clickTable;
  360. - (void)setClickTable:(const NSFSM *)aTable;
  361. - (void)setTag:(int)anInt;
  362. - (int)tag;
  363. - (NSColor *)runColor: (NSRun *)run;
  364. - (NSColor *)selColor;
  365.  
  366. - (void)finishReadingRichText;
  367. - (void)startReadingRichText;
  368. - (void)setRetainedWhileDrawing:(BOOL)aFlag;
  369. - (BOOL)isRetainedWhileDrawing;
  370. - (NSTextBlock *)firstTextBlock;
  371. - (void)setScanFunc:(NSTextFunc)aFunc;
  372. - (NSTextFunc)scanFunc;
  373. - (void)setDrawFunc:(NSTextFunc)aFunc;
  374. - (NSTextFunc)drawFunc;
  375.  
  376. @end
  377.  
  378. @interface NSCStringText(NSFrameRect)
  379. - (void)resizeTextWithOldBounds:(NSRect)oldBounds maxRect:(NSRect)maxRect;
  380. @end
  381.  
  382. @interface NSCStringText(NSLayout)
  383. - (int)calcLine;
  384. - (void *)paragraphStyleForFont:(NSFont *)fontId alignment:(int)alignment;
  385. - (BOOL)charWrap;
  386. - (float)descentLine;
  387. - (void)getMarginLeft:(float *)leftMargin right:(float *)rightMargin top:(float *)topMargin bottom:(float *)bottomMargin;
  388. - (void)getMinWidth:(float *)width minHeight:(float *)height maxWidth:(float)widthMax maxHeight:(float)heightMax;
  389. - (void *)defaultParagraphStyle;
  390. - (float)lineHeight;
  391. - (void)setCharWrap:(BOOL)flag;
  392. - (void)setDescentLine:(float)value;
  393. - (void)setLineHeight:(float)value;
  394. - (void)setMarginLeft:(float)leftMargin right:(float)rightMargin top:(float)topMargin bottom:(float)bottomMargin;
  395. - (void)setNoWrap;
  396. - (void)setParagraphStyle:(void *)paraStyle;
  397. @end
  398.  
  399. @interface NSCStringText(NSLinePosition)
  400. - (int)lineFromPosition:(int)position;
  401. - (int)positionFromLine:(int)line;
  402. @end
  403.  
  404. @interface NSCStringText(NSEvent)
  405. - (void)clear:(id)sender;
  406. - (void)moveCaret:(unsigned short)theKey;
  407. - (void)becomeKeyWindow;
  408. - (void)resignKeyWindow;
  409. - (void)selectText:(id)sender;
  410. @end
  411.  
  412. @interface NSCStringText(NSSelection)
  413. - (void)setSelectionStart:(int)start end:(int)end;
  414. - (void)getSelectionStart:(NSSelPt *)start end:(NSSelPt *)end;
  415. - (void)hideCaret;
  416. - (void)replaceSel:(NSString *)aString;
  417. - (void)replaceSel:(NSString *)aString length:(int)length;
  418. - (void)replaceSel:(NSString *)aString length:(int)length runs:(NSRunArray *)insertRuns;
  419. - (void)scrollSelToVisible;
  420. - (void)selectError;
  421. - (void)selectNull;
  422. - (void)setSelColor:(NSColor *)color;
  423. - (void)showCaret;
  424. - (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType;
  425. - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard;
  426. - (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard types:(NSArray *)types;
  427. @end
  428.  
  429. @interface NSCStringText(NSFont)
  430. - (void)setFont:(NSFont *)fontObj paragraphStyle:(void *)paraStyle;
  431. - (void)setSelFontFamily:(NSString *)fontName;
  432. - (void)setSelFontSize:(float)size;
  433. - (void)setSelFontStyle:(NSFontTraitMask)traits;
  434. - (void)setSelFont:(NSFont *)fontId;
  435. - (void)setSelFont:(NSFont *)fontId paragraphStyle:(void *)paraStyle;
  436. - (BOOL)changeTabStopAt:(float)oldX to:(float)newX;
  437. - (BOOL)setSelProp:(NSParagraphProperty)prop to:(float)val;
  438. @end
  439.  
  440. @class NSCell;
  441.  
  442. @interface NSCStringText(NSGraphics)
  443. - (void)replaceSelWithCell:(NSCell *)cell;
  444. - (NSPoint)locationOfCell:(NSCell *)cell;
  445. - (void)setLocation:(NSPoint)origin ofCell:(NSCell *)cell;
  446. + registerDirective:(NSString *)directive forClass:aClass;
  447. @end
  448.  
  449. @interface NSCStringText(NSFind)
  450. - (BOOL)findText:(NSString *)textPattern ignoreCase:(BOOL)ignoreCase backwards:(BOOL)backwards wrap:(BOOL)wrap;
  451. @end
  452.  
  453. @interface NSObject(NSCStringTextDelegate)
  454. - (void)textWillResize:(NSCStringText *)textObject;
  455. - (NSRect)textDidResize:(NSCStringText *)textObject oldBounds:(NSRect)oldBounds;
  456. - (void)textWillSetSel:(NSCStringText *)textObject toFont:(NSFont *)font;
  457. - (NSFont *)textWillConvert:(NSCStringText *)textObject fromFont:(NSFont *)from toFont:(NSFont *)to;
  458. - (void)textWillStartReadingRichText:(NSCStringText *)textObject;
  459. - (void)textWillFinishReadingRichText:(NSCStringText *)textObject;
  460. - (NSSize)textWillWrite:(NSCStringText *)textObject;
  461. - (void)textDidRead:(NSCStringText *)textObject paperSize:(NSSize)paperSize;
  462. @end
  463.  
  464. @interface NSObject(NSTextCell)
  465. /* Any object added to the Text object via replaceSelWithCell: must respond to all of the following messages:
  466. */
  467. - (void)highlight:(BOOL)flag withFrame:(NSRect)cellFrame inView:(NSView *)controlView;
  468. - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView;
  469. - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:(NSView *)controlView untilMouseUp:(BOOL)flag;
  470. - (NSSize)cellSize;
  471. - (void)readRichText:(NSString *)string forView:(NSView *)view;
  472. - (NSString *)richTextForView:(NSView *)view;
  473. @end
  474.  
  475. APPKIT_EXTERN void NSTextFontInfo(id fid, float *ascender, float *descender, float *lineHt);
  476. APPKIT_EXTERN int NSScanALine(id self, NSLayInfo *layInfo);
  477. APPKIT_EXTERN int NSDrawALine(id self, NSLayInfo *layInfo);
  478. APPKIT_EXTERN unsigned short NSFieldFilter(unsigned short theChar, int flags, NSStringEncoding theEncoding);
  479. APPKIT_EXTERN unsigned short NSEditorFilter(unsigned short theChar, int flags, NSStringEncoding theEncoding);
  480. APPKIT_EXTERN NSData *NSDataWithWordTable(const unsigned char *smartLeft, const unsigned char *smartRight, const unsigned char *charClasses, const NSFSM *wrapBreaks, int wrapBreaksCount, const NSFSM *clickBreaks, int clickBreaksCount, BOOL charWrap);
  481. APPKIT_EXTERN void NSReadWordTable(NSZone *zone, NSData *data, unsigned char **smartLeft, unsigned char **smartRight, unsigned char **charClasses, NSFSM **wrapBreaks, int *wrapBreaksCount, NSFSM **clickBreaks, int *clickBreaksCount, BOOL *charWrap);
  482.  
  483. APPKIT_EXTERN NSTextChunk *NSChunkMalloc(int growBy, int initUsed);
  484. APPKIT_EXTERN NSTextChunk *NSChunkRealloc(NSTextChunk *pc);
  485. APPKIT_EXTERN NSTextChunk *NSChunkGrow(NSTextChunk *pc, int newUsed);
  486. APPKIT_EXTERN NSTextChunk *NSChunkCopy(NSTextChunk *pc, NSTextChunk *dpc);
  487.  
  488. APPKIT_EXTERN NSTextChunk *NSChunkZoneMalloc(int growBy, int initUsed, NSZone *zone);
  489. APPKIT_EXTERN NSTextChunk *NSChunkZoneRealloc(NSTextChunk *pc, NSZone *zone);
  490. APPKIT_EXTERN NSTextChunk *NSChunkZoneGrow(NSTextChunk *pc, int newUsed, NSZone *zone);
  491. APPKIT_EXTERN NSTextChunk *NSChunkZoneCopy(NSTextChunk *pc, NSTextChunk *dpc, NSZone *zone);
  492.  
  493.