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