Commit | Line | Data |
---|---|---|
0e868502 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
95f51977 | 5 | .\" @(#)appen.B 6.1 (Berkeley) 4/23/86 |
0e868502 | 6 | .\" |
c17b8b47 KM |
7 | .ie t .oh '\*(Ln Appendix B''PS1:18-%' |
8 | .eh 'PS1:18-%''\*(Ln Appendix B' | |
0e868502 KM |
9 | .el .he ''\fIAppendix B\fR'' |
10 | .bp | |
11 | .(x | |
12 | .ti 0 | |
13 | .b "Appendix B" | |
14 | .)x | |
c17b8b47 KM |
15 | .nr $1 0 |
16 | .sh 1 "The WINDOW structure" | |
0e868502 KM |
17 | .pp |
18 | The WINDOW structure is defined as follows: | |
19 | .(l I | |
20 | .so win_st.gr | |
21 | .)l | |
22 | .pp | |
23 | .Vn \*_cury \\* | |
24 | .(f | |
25 | \** | |
26 | All variables not normally accessed directly by the user | |
27 | are named with an initial | |
28 | .Bq \*_ | |
29 | to avoid conflicts with the user's variables. | |
30 | .)f | |
31 | and | |
32 | .Vn \*_curx | |
33 | are the current \*y for the window. | |
34 | New characters added to the screen | |
35 | are added at this point. | |
36 | .Vn \*_maxy | |
37 | and | |
38 | .Vn \*_maxx | |
39 | are the maximum values allowed for | |
40 | .Vn \*_cury\*,\*_curx ). ( | |
41 | .Vn \*_begy | |
42 | and | |
43 | .Vn \*_begx | |
44 | are the starting \*y on the terminal for the window, | |
c17b8b47 | 45 | .i i.e. , |
0e868502 KM |
46 | the window's home. |
47 | .Vn \*_cury , | |
48 | .Vn \*_curx , | |
49 | .Vn \*_maxy , | |
50 | and | |
51 | .Vn \*_maxx | |
52 | are measured relative to | |
53 | .Vn \*_begy\*,\*_begx ), ( | |
54 | not the terminal's home. | |
55 | .pp | |
56 | .Vn \*_clear | |
57 | tells if a clear-screen sequence is to be generated | |
58 | on the next | |
59 | .Fn refresh | |
60 | call. | |
61 | This is only meaningful for screens. | |
62 | The initial clear-screen for the first | |
63 | .Fn refresh | |
64 | call is generated by initially setting clear to be TRUE for | |
65 | .Vn curscr , | |
66 | which always generates a clear-screen if set, | |
67 | irrelevant of the dimensions of the window involved. | |
68 | .Vn \*_leave | |
69 | is TRUE if the current \*y and the cursor | |
70 | are to be left after the last character changed on the terminal, | |
71 | or not moved if there is no change. | |
72 | .Vn \*_scroll | |
73 | is TRUE | |
74 | if scrolling is allowed. | |
75 | .pp | |
76 | .Vn \*_y | |
77 | is a pointer to an array of lines which describe the terminal. | |
78 | Thus: | |
79 | .(l | |
80 | \*_y[i] | |
81 | .)l | |
82 | .lp | |
83 | is a pointer to the | |
84 | .Vn i th | |
85 | line, and | |
86 | .(l | |
87 | \*_y[i][j] | |
88 | .)l | |
89 | .lp | |
90 | is the | |
91 | .Vn j th | |
92 | character on the | |
93 | .Vn i th | |
94 | line. | |
0e868502 KM |
95 | .Vn \*_flags |
96 | can have one or more values | |
97 | or'd into it. | |
c17b8b47 KM |
98 | .pp |
99 | For windows that are not subwindows, | |
100 | .Vn \*_orig | |
101 | is | |
102 | NULL . | |
103 | For subwindows, | |
104 | it points to the main window | |
105 | to which the window is subsidiary. | |
106 | .Vn \*_nextp | |
107 | is a pointer in a circularly linked list | |
108 | of all the windows which are subwindows of the same main window, | |
109 | plus the main window itself. | |
110 | .pp | |
111 | .Vn \*_firstch | |
112 | and | |
113 | .Vn \*_lastch | |
114 | are | |
115 | .Fn malloc ed | |
116 | arrays which contain the index of the | |
117 | first and last changed characters | |
118 | on the line. | |
119 | .Vn \*_ch\*_off | |
120 | is the x offset for the window | |
121 | in the | |
122 | .Vn \*_firstch | |
123 | and | |
124 | .Vn \*_lastch | |
125 | arrays for this window. | |
126 | For main windows, | |
127 | this is always 0; | |
128 | for subwindows | |
129 | it is the difference between the starting point of the main window | |
130 | and that of the subindow, | |
131 | so that change markers can be set relative to the main window. | |
132 | This makes these markers global in scope. | |
133 | .pp | |
134 | All subwindows share the appropriate portions of | |
135 | .Vn _y , | |
136 | .Vn _firstch , | |
137 | .Vn _lastch , | |
138 | and | |
139 | .Vn _insdel | |
140 | with their main window. | |
141 | .pp | |
0e868502 KM |
142 | .b \*_ENDLINE |
143 | says that the end of the line for this window | |
144 | is also the end of a screen. | |
145 | .b \*_FULLWIN | |
146 | says that this window is a screen. | |
147 | .b \*_SCROLLWIN | |
148 | indicates that the last character of this screen | |
149 | is at the lower right-hand corner of the terminal; | |
150 | .i i.e. , | |
151 | if a character was put there, | |
152 | the terminal would scroll. | |
c17b8b47 KM |
153 | .b \*_FULLLINE |
154 | says that the width of a line is the same as the width of the terminal. | |
155 | If | |
156 | .b \*_FLUSH | |
157 | is set, | |
158 | it says that | |
159 | .Fn fflush "" "" stdout | |
160 | should be called at the end of each | |
161 | .Fn refresh | |
0e868502 KM |
162 | .b \*_STANDOUT |
163 | says that all characters added to the screen | |
164 | are in standout mode. | |
c17b8b47 KM |
165 | .b \*_INSDEL |
166 | is reserved for future use, | |
167 | and is set by | |
168 | .Fn idlok . | |
169 | .Vn \*_firstch | |
170 | is set to | |
171 | .b \*_NOCHANGE | |
172 | for lines on which there has been no change | |
173 | since the last | |
174 | .Fn refresh . |