home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / NeXTanswers / OpenStepSpec_rtf / ApplicationKit / Functions / CFunctions.rtf
Encoding:
Text File  |  1994-07-01  |  24.3 KB  |  338 lines

  1. {\rtf0\ansi\paperw16228 \paperh18648 \margl-907 \margr0 \margt0 \margb0 {\fonttbl\f0\fswiss Helvetica;\f1\froman Times;\f2\fmodern Courier;\f3\ftech Symbol;\f4\froman Palatino;}
  2. {\stylesheet{\s0 \li100 \fi0 \ri1007 \ql   1Head;}
  3. {\s1 \li1360 \fi0 \ri1007 \ql   2Head;}
  4. {\s2 \li100 \fi0 \ri1007 \ql   2Head-new;}
  5. {\s3 \li1360 \fi0 \ri1007 \ql \tx1738 \tx2116 \tx2494   Body;}
  6. {\s4 \li1738 \fi0 \ri1007 \ql \tx2116 \tx2494 \tx2872   BodyIndented;}
  7. {\s5 \li1738 \fi-378 \ri1007 \ql \tx1738 \tx2116 \tx2494   BulletLong;}
  8. {\s6 \li1738 \fi-378 \ri1007 \ql   BulletShort;}
  9. {\s7 \li100 \fi0 \ri1007 \ql   ClassName;}
  10. {\s8 \li1738 \fi0 \ri1007 \ql   CodeExamp;}
  11. {\s9 \li2116 \fi0 \ri1007 \ql   CodeExamp2;}
  12. {\s10 \li2872 \fi-2771 \ri1007 \ql \tx2872   ConformsTo;}
  13. {\s11 \li2872 \fi-2771 \ri1007 \ql   DeclaredIn;}
  14. {\s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030   Description;}
  15. {\s13 \li7030 \fi-5796 \ri1007 \ql   DescriptionPart;}
  16. {\s14 \li0 \fi0 \ri0 \ql \tx-25 \tx8290 \tx9172   Footer;}
  17. {\s15 \li5896 \fi-4159 \ri1007 \ql \tx3880   Function;}
  18. {\s16 \li2872 \fi-2771 \ri1007 \ql \tx2872   InheritsFrom;}
  19. {\s17 \li1360 \fi0 \ri1007 \ql   Note;}
  20. {\s18 \li100 \fi0 \ri1007 \ql   Summary;}
  21. {\s19 \li100 \fi0 \ri1007 \ql   Summary-new;}
  22. {\s20 \li2494 \fi0 \ri1007 \ql \tx6148 \tx10180   TableBody1;}
  23. {\s21 \li6148 \fi-3654 \ri1007 \ql \tx6148 \tx10432   TableBody2;}
  24. {\s22 \li2494 \fi0 \ri1007 \ql \tx6148 \tx10180   TableHead;}
  25. {\s23 \li1360 \fi-1987 \ri1007 \ql \tx-39 \tx1360   Warning;}
  26. }
  27. \li0 \fi0 \ri0 \ql \sb0 \f1 \fs24 
  28. (Preliminary Documentation) Copyright \f3 \'e3\f1 1994 by NeXT Computer, Inc.  All Rights Reserved.\
  29. \
  30. \pard \s3 \li1360 \fi0 \ri1007 \ql \f1 \fs28 \li100 \fi1260 \fi0 \tx478 \tx856 \tx1234 \fs16 \
  31. \
  32. \fs28 \
  33. \fs16 \
  34. \
  35. \fs28 \li1360 \fi-1260 \fi0 \li100 \fi1260 \fi0 \tx478 \tx856 \tx1234 \fs16 \fs28 \
  36. \fs16 \
  37. \
  38. \fs28 \pard \s0 \li100 \fi0 \ri1007 \ql \f0 \b \fs52 \fs16 \
  39. \
  40. \
  41. \
  42. \fs52 Application Kit Functions\
  43. \fs16 \
  44. \
  45. \fs52 \s2 \fs36 \fs16 \
  46. \
  47. \
  48. \fs36 Rectangle Drawing Functions\
  49. \fs16 \
  50. \fs36 \s19 \fs28 \fs16 \
  51. \
  52. \fs28 Optimize drawing\
  53. \fs16 \
  54. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void\b  NSEraseRect(\b0 NSRect \i aRect\b \i0 )    \b0 Erases the rectangle by filling it with white.  (This does not alter the current drawing color\b .\b0 )\
  55. \fi-6552 \fi-6552 \fi-6552 void \b NSHighlightRect(\b0 NSRect \i aRect\b \i0 )    \b0 Highlights or unhighlights a rectangle by switching light gray for white and vice versa, when drawing on the screen.  If not drawing to the screen, the rectangle is filled with light gray.\
  56. \fi-6552 \fi-6552 \fi-6552 void\b  NSRectClip(\b0 NSRect \i aRect\b \i0 )    \b0 Intersects the current clipping path with the rectangle \i aRect\i0 , to determine a new clipping path. \
  57. \fi-6552 \fi-6552 \fi-6552 void\b  NSRectClipList(\b0 const NSRect *\i rects\i0 ,     Takes an array of \i count\i0  number of rectangles and intersects \
  58. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i count\b \i0 )    \b0     the current clipping path with each of them.  Thus, the new clipping path is the graphic intersection of all the rectangles and the original clipping path. \
  59. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 void\b  NSRectFill(\b0 NSRect \i aRect\b \i0 )    \b0 Fills the rectangle referred to by \i aRect\i0  with the current color.\b  \
  60. \fi-6552 \fi-6552 \b0 \fi-6552 void\b  NSRectFillList(\b0 const NSRect *\i rects\i0 , \
  61. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i count\b \i0 )    \b0 Fills an array of \i count\i0  rectangles with the current color.\
  62. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 void\b  NSRectFillListWithGrays(\b0 const NSRect *\i rects\i0 , \
  63. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 const float *\i grays\i0 , int \i count\b \i0 )    \b0 Fills each rectangle in the array \i rects\i0  with the gray whose value is stored at the corresponding location in the array \i grays.  \i0 Both arrays must be \i count\i0  elements long. Avoid  rectangles that overlap, because the order in which they'll be filled can't be guaranteed.\b  \
  64. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \fs16 \
  65. \
  66. \
  67. \fs28 Draw a bordered rectangle\
  68. \fs16 \
  69. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void \b NSDrawButton(\b0 NSRect \i aRect\i0 ,     Draws the bordered light gray rectangle whose appearance\
  70. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSRect \i clipRect\b \i0 )    \b0     signifies a button in the OpenStep user interface. \i aRect\i0  is the bounds for the button, but only the area where \i aRect\i0  intersects \i clipRect \i0 is drawn.\
  71. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 void \b NSDrawGrayBezel(\b0 NSRect \i aRect\i0 ,     Draws a bordered light gray rectangle with the appearance\
  72. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSRect \i clipRect\b \i0 )    \b0     of a pushed-in button, clipped by intersecting with \i clipRect\i0 .\
  73. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 void\b  NSDrawGroove(\b0 NSRect \i aRect\i0 ,     Draws a  light gray rectangle whose border is a groove, \
  74. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSRect \i clipRect\b \i0 )\b0         giving the appearance of a typical box in the OpenStep user interface.\
  75. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSRect *\b NSDrawTiledRects(\b0 NSRect \i boundsRect\i0 ,     Draws an unfilled rectangle, clipped by \i clipRect\i0 , whose \
  76. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSRect \i clipRect\i0 , \b  \b0          border is defined by the parallel arrays \i sides\i0  and \i grays,\
  77. \i0 const NSRectEdge *\i sides\i0 ,        both of length \i count. \i0 Each element of \i sides \i0 specifies an\
  78. const float *\i grays\i0 , \b     \b0 \i     \i0 edge of the rectangle, which is drawn with a width of\
  79. int \i count\b \i0 )    \b0     1.0 using the corresponding gray level from \i grays\i0 . If the \i edges\i0  array contains\b  \b0 recurrences of the same edge, each is inset\b  \b0 within the previous edge.\
  80. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 void \b NSDrawWhiteBezel(\b0 NSRect \i aRect\i0 ,     Draws a  white rectangle with a bezeled border. Only the\
  81. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSRect \i clipRect\b \i0 )    \b0     area that intersects \i clipRect \i0 is drawn.\
  82. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 void\b  NSFrameRect(\b0 NSRect \i aRect\b \i0 )    \b0 Draws a frame of width 1.0 around the inside of a rectangle, using the current color. \
  83. \fi-6552 \fi-6552 \fi-6552 void\b  NSFrameRectWithWidth(\b0 NSRect \i aRect\i0 ,     Draws a frame of width \i frameWidth\i0  around the inside of a\
  84. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 float \i frameWidth\b \i0 )    \b0     rectangle, using the current color.\
  85. \pard \s2 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  86. \
  87. \
  88. \
  89. \
  90. \fs36 Color Functions\
  91. \fs16 \
  92. \fs36 \s19 \fs28 \fs16 \
  93. \
  94. \fs28 Get information about color space and window depth\
  95. \fs16 \
  96. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 int\b  NSBitsPerSampleFromDepth(\b0 NSWindowDepth\b  \b0 \i depth\b \i0 )\
  97. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Returns the number of bits per sample (bits per pixel in each color component) for the given window depth.\
  98. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSString *\b NSColorSpaceFromDepth(\b0 NSWindowDepth \i depth\b \i0 )\
  99. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Returns the name of the color space that matches the given window depth.\
  100. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 BOOL \b NSGetBestDepth(\b0 NSWindowDepth *\i depth\i0 ,     Returns YES if the function can provide, in the \i depth\
  101. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \i0 int \i numColors\i0 , int \i bps\b \i0 )    \b0 \i     \i0 argument, a window depth deep enough for the given number of colors and the given number of bits per sample.\
  102. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 int \b NSNumberOfColorComponents(\b0 NSString *\i colorSpaceName\b \i0 )\
  103. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Returns the number of color components in the named color space.\
  104. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  105. \
  106. \
  107. \fs28 Read the color at a screen position\
  108. \fs16 \
  109. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 NSColor *\b NSReadPixel(\b0 NSPoint \i location\b \i0 )    \b0 Returns the color of the pixel at the given location, which must be specified in the current view\'27s coordinate system.\
  110. \fi-6552 \pard \s2 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  111. \
  112. \
  113. \
  114. \
  115. \fs36 Text Functions\
  116. \fs16 \
  117. \fs36 \s19 \fs28 \fs16 \
  118. \
  119. \fs28 Filter characters entered into a Text object\
  120. \fs16 \
  121. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 unsigned short \b NSEditorFilter(\b0 unsigned short \i theChar\i0 , \
  122. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i flags, \b \i0     \b0 Identical to \b NSFieldFilter()\b0  except that it passes on values\
  123. NSStringEncoding \i theEncoding\b \i0 )\b0          corresponding to Return, Tab, and Shift-Tab directly to the NSText object.\
  124. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 unsigned short \b NSFieldFilter(\b0 unsigned short \i theChar\i0 , \
  125. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i flags\i0 ,     Checks each character the user types into an NSText\
  126. NSStringEncoding \i theEncoding\b \i0 )    \b0     object's text, allowing the user to move the selection among text fields by pressing Return, Tab, or Shift-Tab. Alphanumeric characters are passed to the NSText object for display. The function returns either  the ASCII value of the character typed, 0 (for illegal characters or ones entered while a Command key is held down), or a constant that the Text object interprets as a movement command.\
  127. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  128. \
  129. \
  130. \fs28 Calculate or draw a line of text (in Text object)\
  131. \fs16 \
  132. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 int \b NSDrawALine(\b0 id \i self\i0 ,     Draws a line of text, using the global variables set by\
  133. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSLayInfo *\i layInfo\b \i0 )    \b0     \b NSScanALine()\b0 . The return value has no significance.\
  134. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 int \b NSScanALine(\b0 id \i self\i0 ,     Determines the placement of characters in a line\i  \i0 of text. \i self\
  135. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \i0 NSLayInfo *\i layInfo\b \i0 )    \b0 \i      \i0 refers to the NSText object calling the function, and \i *layInfo\i0  is an NSLayInfo struct.  The function returns 1  if a word's length exceeds the width of a line and the NSText\'27s \b charWrap\b0  instance variable is NO.  Otherwise, it returns 0.\
  136. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  137. \
  138. \
  139. \fs28 Calculate font ascender, descender, and line height (in Text object)\
  140. \fs16 \
  141. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void\b  NSTextFontInfo(\b0 NSFont *\i font\i0 ,     Calculates, and returns by reference, the ascender,\
  142. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 float *\i ascender\i0 , float *\i descender\i0 ,         descender, and line height values for the NSFont given \
  143. float *\i lineHeight\b \i0 )    \b0     by  \i font\i0 .\
  144. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  145. \
  146. \
  147. \fs28 Access Text object\'27s word tables\
  148. \fs16 \
  149. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 \fs28 NSData * \b NSDataWithWordTable(\b0 \fs28 const\i  \i0 unsigned char\fs28  *\i \fs28 preSelSmart\i0 \fs28 , \
  150. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \fs28 const unsigned char\fs28  *\i \fs28 postSelSmart\i0 \fs28 , \b     \b0 Given pointers to word table structures, records the\
  151. \fs28 const unsigned cha\fs28 r *\i \fs28 charClasses\i0 \fs28 ,         structures in the returned NSData object. The\
  152. \fs28 const NSFSM \fs28 *\i wrapBreaks\i0 ,         arguments are similar to those of\
  153. \fs28 int \i \fs28 wrapBreaksCount\i0 ,         \b \fs28 NSReadWordTable\fs28 ()\b0 .\
  154. \fs28 const NSFSM \fs28 *\i clickBreaks\i0 , \
  155. \fs28 int \i \fs28 clickBreaksCount\i0 , \
  156. \fs28 BOOL\fs28  \i charWrap\b \i0 )\b0  \
  157. \s12 \li7029 \fi-5794 \fi-6552 \fs28 \fi-6552 void \b  NSReadWordTable(\b0 \fs28 NSZone\b  \b0 *\i zone\i0 ,\b      \b0 \fs28 Given \i data\i0 , creates word tables in the memory zone\
  158. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSData *\i data\i0 ,         specified by \i zone\i0 , returning (in the subsequent \
  159. unsigned char **\i preSelSmart\i0 ,         arguments)  pointers to the various tables. The\b  \b0 integer\
  160. unsigned char **\i postSelSmart\i0 ,         pointer arguments return the length of the preceding\
  161. unsigned char **\i charClasses\i0 ,         array, and \i charWrap\i0  indicates whether words whose\
  162. NSFSM **\i wrapBreaks\i0 ,         length exceeds the Text object's line length should be\
  163. int *\i wrapBreaksCount\i0 ,         wrapped on a character-by-character basis.\
  164. NSFSM **\i clickBreaks\i0 , \
  165. int *\i clickBreaksCount\i0 , \
  166. \fs28 BOOL *\i charWrap\b \i0 \fs28 )\
  167. \pard \s2 \li100 \fi0 \ri1007 \ql \f0 \fs36 \fs16 \
  168. \
  169. \
  170. \
  171. \
  172. \fs36 Array allocation functions for use by the NSText class\
  173. \fs16 \
  174. \fs36 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fs28 \fi-6552 NSTextChunk *\b NSChunkCopy(\b0 NSTextChunk *\i pc\i0 ,     Copies the array \i pc\i0  to the array \i dpc\i0  and returns a pointer to\
  175. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSTextChunk *\i dpc\b \i0 )    \b0     the copy. \
  176. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSTextChunk \b *NSChunkGrow(\b0 NSTextChunk *\i pc\i0 ,     Increases the array identified by the pointer \i pc\i0  to a size of\
  177. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i newUsed\b \i0 )    \b0 \i     newUsed\i0  bytes.\
  178. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSTextChunk *\b NSChunkMalloc(\b0 int \i growBy\i0 ,     Allocates initial memory for a structure whose  first field is\
  179. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i initUsed\b \i0 )    \b0     an NSTextChunk structure and whose subsequent field is a variable-sized array. The amount of memory allocated is equal to \i initUsed\i0 .  If \i initUsed\i0  is 0, \i growBy\i0  bytes are allocated. \i growBy \i0 specifies how much memory should be allocated when the chunk grows.\
  180. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSTextChunk *\b NSChunkRealloc(\b0 NSTextChunk *\i pc\b \i0 )    \
  181. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0 \b     \b0 Increases the amount of memory available for the array identified by the pointer \i pc\i0 , as determined by the array\'27s NSTextChunk.\
  182. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSTextChunk *\b NSChunkZoneCopy(\b0 NSTextChunk *\i pc\i0 , \
  183. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSTextChunk *\i dpc\i0 ,     Like \b NSChunkCopy()\b0 , but uses the specified zone of\
  184. NSZone *\i zone\b \i0 )\b0         memory.\
  185. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSTextChunk *\b NSChunkZoneGrow(\b0 NSTextChunk *\i pc\i0 ,\
  186. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i newUsed\i0 ,     Like \b NSChunkGrow()\b0 , but uses the specified zone of\
  187. NSZone *\i zone\b \i0 )    \b0     memory.\
  188. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSTextChunk *\b NSChunkZoneMalloc(\b0 int \i growBy\i0 ,     Like \b NSChunkMalloc()\b0 , but uses the specified zone of\
  189. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i initUsed\i0 ,         memory.\
  190. NSZone *\i zone\b \i0 )\
  191. \s12 \li7029 \fi-5794 \fi-6552 \b0 \fi-6552 NSTextChunk *\b NSChunkZoneRealloc(\b0 NSTextChunk *\i pc\i0 , \
  192. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSZone *\i zone\b \i0 )    \b0 Like \b NSChunkRealloc()\b0 , but uses the specified zone of memory.\
  193. \pard \s2 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  194. \
  195. \
  196. \
  197. \
  198. \fs36 Imaging Functions\
  199. \fs16 \
  200. \fs36 \s19 \fs28 \fs16 \
  201. \
  202. \fs28 Copy an image\
  203. \fs16 \
  204. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void \b  NSCopyBitmapFromGstate(\b0 int \i gstate\i0 ,     Copies the pixels in the rectangle \i srcRect\i0  to the rectangle\
  205. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSRect \i srcRect\i0 ,         \i destRect\i0 .  The source rectangle is defined in the \
  206. NSRect\i  destRect\b \i0 )    \b0       graphics state designated by \i gstate\i0 , and the destination is defined in the current graphics state.  \
  207. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 void \b NSCopyBits(\b0 int \i gstate\i0 ,     Copies the pixels in the rectangle \i aRect\i0  to the location\
  208. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSRect\i  aRect\i0 ,         \i aPoint\i0 .  The source rectangle is defined in the current\
  209. NSPoint \i aPoint\b \i0 )        \b0  graphics state if \i gstate\i0  is NSNullObject; otherwise, in the graphics state designated by \i gstate\i0 .  The \i aPoint\i0  destination is defined in the current graphics state.\
  210. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  211. \
  212. \
  213. \fs28 Render bitmap images\
  214. \fs16 \
  215. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void \b NSDrawBitmap\b0 (NSRect \i rect\i0 ,    Renders an image from a bitmap. \i rect\i0  is the rectangle in\
  216. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 int \i pixelsWide\i0 ,        which the image is drawn, and \i data \i0 is the bitmap data,\
  217. int \i pixelsHigh\i0 ,        stored in up to 5 channels unless \i isPlanar \i0 is NO (in\
  218. int \i bitsPerSample\i0 ,         which case the channels are interleaved in a single \
  219. int \i samplesPerPixel\i0 ,        array).\
  220. int \i bitsPerPixel\i0 ,\
  221. int \i bytesPerRow\i0 , \
  222. BOOL \i isPlanar\i0 ,\
  223. BOOL \i hasAlpha\i0 , \
  224. NSString *\i colorSpaceName\i0 , \
  225. const unsigned char *const \i data\i0 [5]\b )\
  226. \pard \s2 \li100 \fi0 \ri1007 \ql \f0 \fs36 \fs16 \
  227. \
  228. \
  229. \
  230. \
  231. \fs36 Attention Panel Functions\
  232. \fs16 \
  233. \fs36 \s19 \fs28 \fs16 \
  234. \
  235. \fs28 Create an attention panel without running it yet\
  236. \fs16 \
  237. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 id \b NSGetAlertPanel(\b0 NSString *\i title\i0 ,     Returns an NSPanel object that you can use in a modal\
  238. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSString *\i msg\i0 , \i         \i0 session. Unlike \b NSRunAlertPanel()\b0 , no button is\
  239. NSString *\i firstButton\i0 , \i         \i0 displayed if \i firstButton\i0  is NULL.\
  240. NSString *\i alternateButton\i0 , \
  241. NSString *\i otherButton, ...\b \i0 )\
  242. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \fs16 \
  243. \
  244. \
  245. \fs28 Create and run an attention panel\
  246. \fs16 \
  247. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 int \b NSRunAlertPanel(\b0 NSString *\i title\i0 ,     Creates an attention panel that alerts the user to some\
  248. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSString *\i msg,         \i0 consequence of a requested action, and runs the panel in\
  249. NSString *\i defaultButton,         \i0 a modal event loop. \i title\i0  is the panel\'27s title (by default, \
  250. NSString *\i alternateButton,         \i0 \'aaAlert\'ba); \i msg\i0  is the \b printf()\b0 -style message that's\
  251. NSString *\i otherButton, ...\b \i0 )    \b0     displayed in the panel; \i defaultButton \i0 (by default, \'aaOK\'ba) is the title for the main button, also activated by Return; \i alternateButton \i0 and \i otherButton \i0 give two more choices, which are displayed only if\i  \i0 the corresponding argument isn\'27t NULL.\i  \i0 The trailing arguments are a variable number of \b printf()\b0 -style\i  \i0 arguments to \i msg\i0 .\
  252. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 int \b NSRunLocalizedAlertPanel(\b0 NSString *\i table\i0 ,     Similar to \b NSRunAlertPanel()\b0 , but preferred, as it makes\
  253. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSString *\i title\i0 ,         use of OpenStep\'27s localization feature for languages of\
  254. NSString *\i msg,     \i0     different countries.\
  255. NSString *\i defaultButton, \
  256. \i0 NSString *\i alternateButton, \
  257. \i0 NSString *\i otherButton, ...\b \i0 )\
  258. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \fs16 \
  259. \
  260. \
  261. \fs28 Release an attention panel\
  262. \fs16 \
  263. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void \b NSReleaseAlertPanel\b0 (id \i panel\i0 )    Releases the specified alert panel.\
  264. \fi-6552 \pard \s2 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  265. \
  266. \
  267. \
  268. \
  269. \fs36 Services Menu Functions\
  270. \fs16 \
  271. \fs36 \s19 \fs28 \fs16 \
  272. \
  273. \fs28 Determine whether an item is included in Services menus\
  274. \fs16 \
  275. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 int \b NSSetShowsServicesMenuItem(\b0 NSString *\i item\i0 , \
  276. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 BOOL \i showService\b \i0 )    \b0 Determines (based on the value of \i showService\i0 ) whether the \i item\i0  command will be included in other applications\'27 Services menus. \i item \i0 describes a service provided by this application, and should be the same string entered in the \'aaMenu Item:\'ba field of the services file.  The function returns 0 upon success.\
  277. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 BOOL \b NSShowsServicesMenuItem(\b0 NSString *\i item\b \i0 )\
  278. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Returns YES if \i item\i0  is currently shown in Services menus.\
  279. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  280. \
  281. \
  282. \fs28 Programmatically invoke a service\
  283. \fs16 \
  284. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 BOOL \b NSPerformService(\b0 NSString *\i item\i0 ,     Invokes a service found in the application\'27s Services menu.\
  285. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 NSPasteboard *\i pboard\b \i0 )    \b0      \i item\i0  is the name of a Services menu item, in any language; a slash in this name represents a submenu.  \i pboard\i0  must contain the data required by the service, and when the function returns, \i pboard\i0  will contain the data supplied by the service provider.\
  286. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  287. \
  288. \
  289. \fs28 Force Services menu to update based on new services\
  290. \fs16 \
  291. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void \b NSUpdateDynamicServices(\b0 void\b )    \b0 Re-registers the services the application is willing to provide, by reading the file with the extension \'aa.service\'ba in the application path or in the standard path for services.\
  292. \fi-6552 \pard \s2 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  293. \
  294. \
  295. \
  296. \
  297. \fs36 Other Application Kit Functions\
  298. \fs16 \
  299. \fs36 \s19 \fs28 \fs16 \
  300. \
  301. \fs28 Play the system beep\
  302. \fs16 \
  303. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void \b NSBeep(\b0 void\b )    \b0 Plays the system beep.\
  304. \fi-6552 \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  305. \
  306. \
  307. \fs28 Return file-related pasteboard types\
  308. \fs16 \
  309. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 NSString\b  *NSCreateFileContentsPboardType(\b0 NSString *\i fileType\b \i0 )\
  310. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Returns a string naming a pasteboard type that represents a file's contents, based on the supplied string \i fileType\i0 .  \i fileType\i0  should generally be the extension part of a file name.  The conversion from a named file type to a pasteboard type is simple; no mapping to standard pasteboard types is attempted.\
  311. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSString *\b NSCreateFilenamePboardType(\b0 NSString *\i filename\b \i0 )\
  312. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Returns a string naming a pasteboard type that represents a a file name, based on the supplied string \i filename\i0 .  \
  313. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSString *\b NSGetFileType(\b0 NSString *\i pboardType\b \i0 )    \
  314. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Returns the extension or file name from which the pasteboard type \i pboardType\i0  was derived.  \b nil\b0  is returned  if \i pboardType\i0  isn't a pasteboard type created by \b NSCreateFileContentsPboardType()\b0  or \b NSCreateFilenamePboardType()\b0 .\
  315. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 NSArray *\b NSGetFileTypes(\b0 NSArray *\i pboardTypes\b \i0 )\
  316. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 \b0     Accepts an array of pasteboard types and returns an array of the unique extensions and file names from the file-content and file-name types found in the input array.  It returns \b nil\b0  if the input array contains no file-content or file-name types.\
  317. \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  318. \
  319. \
  320. \fs28 Draw a distinctive outline around linked data\
  321. \fs16 \
  322. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 void \b  NSFrameLinkRect(\b0 NSRect \i aRect\i0 ,     Draws a distinctive link outline just outside the rectangle\
  323. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796 BOOL \i isDestination\b \i0 )    \b0 \i aRect\i0 .  To draw an outline around a destination link, \i isDestination\i0  should be YES, otherwise NO. \
  324. \s12 \li7029 \fi-5794 \fi-6552 \fi-6552 float \b  NSLinkFrameThickness(\b0 void\b )\b0     Returns the thickness of the link outline so that the outline can be properly erased by the application, or for other purposes.\
  325. \fi-6552 \pard \s19 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  326. \
  327. \
  328. \fs28 Convert an event mask type to a mask\
  329. \fs16 \
  330. \fs28 \pard \s12 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 unsigned int \b NSEventMaskFromType\b0 (NSEventType \i type\i0 )\
  331. \fi-6552 \s13 \li7030 \fi-6553 \fi-5796     Returns the event mask corresponding to \i type\i0  (which is an enumeration constant). The returned mask equals 1 left-shifted by \i type \i0 bits. \
  332. \pard \s3 \li1360 \fi0 \ri1007 \ql \fs28 \li100 \fi1260 \fi0 \tx478 \tx856 \tx1234 \fs16 \
  333. \
  334. \fs28 \
  335. \fs16 \
  336. \
  337. \fs28 }
  338.