home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / prgramer / unix / emx / bsd / curses / doc / appen.b < prev    next >
Encoding:
Text File  |  1991-04-17  |  5.4 KB  |  202 lines

  1. .\" Copyright (c) 1980 The Regents of the University of California.
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"    This product includes software developed by the University of
  15. .\"    California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"    @(#)appen.B    6.3 (Berkeley) 4/17/91
  33. .\"
  34. .ie t .oh '\*(Ln Appendix B''PS1:18-%'
  35. .eh 'PS1:18-%''\*(Ln Appendix B'
  36. .el .he ''\fIAppendix B\fR''
  37. .bp
  38. .(x
  39. .ti 0
  40. .b "Appendix B"
  41. .)x
  42. .nr $1 0
  43. .sh 1 "The WINDOW structure"
  44. .pp
  45. The WINDOW structure is defined as follows:
  46. .(l I
  47. .so win_st.gr
  48. .)l
  49. .pp
  50. .Vn \*_cury \\*
  51. .(f
  52. \**
  53. All variables not normally accessed directly by the user
  54. are named with an initial
  55. .Bq \*_
  56. to avoid conflicts with the user's variables.
  57. .)f
  58. and
  59. .Vn \*_curx
  60. are the current \*y for the window.
  61. New characters added to the screen
  62. are added at this point.
  63. .Vn \*_maxy
  64. and
  65. .Vn \*_maxx
  66. are the maximum values allowed for
  67. .Vn \*_cury\*,\*_curx ). (
  68. .Vn \*_begy
  69. and
  70. .Vn \*_begx
  71. are the starting \*y on the terminal for the window,
  72. .i i.e. ,
  73. the window's home.
  74. .Vn \*_cury ,
  75. .Vn \*_curx ,
  76. .Vn \*_maxy ,
  77. and
  78. .Vn \*_maxx
  79. are measured relative to
  80. .Vn \*_begy\*,\*_begx ), (
  81. not the terminal's home.
  82. .pp
  83. .Vn \*_clear
  84. tells if a clear-screen sequence is to be generated
  85. on the next
  86. .Fn refresh
  87. call.
  88. This is only meaningful for screens.
  89. The initial clear-screen for the first
  90. .Fn refresh
  91. call is generated by initially setting clear to be TRUE for
  92. .Vn curscr ,
  93. which always generates a clear-screen if set,
  94. irrelevant of the dimensions of the window involved.
  95. .Vn \*_leave
  96. is TRUE if the current \*y and the cursor
  97. are to be left after the last character changed on the terminal,
  98. or not moved if there is no change.
  99. .Vn \*_scroll
  100. is TRUE
  101. if scrolling is allowed.
  102. .pp
  103. .Vn \*_y
  104. is a pointer to an array of lines which describe the terminal.
  105. Thus:
  106. .(l
  107. \*_y[i]
  108. .)l
  109. .lp
  110. is a pointer to the
  111. .Vn i th
  112. line, and
  113. .(l
  114. \*_y[i][j]
  115. .)l
  116. .lp
  117. is the
  118. .Vn j th
  119. character on the
  120. .Vn i th
  121. line.
  122. .Vn \*_flags
  123. can have one or more values
  124. or'd into it.
  125. .pp
  126. For windows that are not subwindows,
  127. .Vn \*_orig
  128. is
  129. NULL .
  130. For subwindows,
  131. it points to the main window
  132. to which the window is subsidiary.
  133. .Vn \*_nextp
  134. is a pointer in a circularly linked list
  135. of all the windows which are subwindows of the same main window,
  136. plus the main window itself.
  137. .pp
  138. .Vn \*_firstch
  139. and
  140. .Vn \*_lastch
  141. are
  142. .Fn malloc ed
  143. arrays which contain the index of the
  144. first and last changed characters
  145. on the line.
  146. .Vn \*_ch\*_off
  147. is the x offset for the window
  148. in the
  149. .Vn \*_firstch
  150. and
  151. .Vn \*_lastch
  152. arrays for this window.
  153. For main windows,
  154. this is always 0;
  155. for subwindows
  156. it is the difference between the starting point of the main window
  157. and that of the subindow,
  158. so that change markers can be set relative to the main window.
  159. This makes these markers global in scope.
  160. .pp
  161. All subwindows share the appropriate portions of
  162. .Vn _y ,
  163. .Vn _firstch ,
  164. .Vn _lastch ,
  165. and
  166. .Vn _insdel
  167. with their main window.
  168. .pp
  169. .b \*_ENDLINE
  170. says that the end of the line for this window
  171. is also the end of a screen.
  172. .b \*_FULLWIN
  173. says that this window is a screen.
  174. .b \*_SCROLLWIN
  175. indicates that the last character of this screen
  176. is at the lower right-hand corner of the terminal;
  177. .i i.e. ,
  178. if a character was put there,
  179. the terminal would scroll.
  180. .b \*_FULLLINE
  181. says that the width of a line is the same as the width of the terminal.
  182. If
  183. .b \*_FLUSH
  184. is set,
  185. it says that
  186. .Fn fflush "" "" stdout
  187. should be called at the end of each
  188. .Fn refresh
  189. .b \*_STANDOUT
  190. says that all characters added to the screen
  191. are in standout mode.
  192. .b \*_INSDEL
  193. is reserved for future use,
  194. and is set by
  195. .Fn idlok .
  196. .Vn \*_firstch
  197. is set to
  198. .b \*_NOCHANGE
  199. for lines on which there has been no change
  200. since the last
  201. .Fn refresh .
  202.