|
|
coherent
Subject: 386 curses
386 curses gives the window structure as follows.
This is new code and will contain some bugs.
typedef unsigned short chtype;
struct _win_st {
short _cury, _curx;
short _maxy, _maxx;
short _begy, _begx;
short _flags;
chtype _attrs;
bool _clear;
bool _leave;
bool _scroll;
bool _idlok;
bool _use_keypad; /* 0=no, 1=yes, 2=yes/timeout */
bool _use_meta; /* T=use the meta key */
bool _nodelay; /* T=don't wait for tty input */
chtype **_line;
short *_firstchar; /* First changed character in the line */
short *_lastchar; /* Last changed character in the line */
short *_numchngd; /* Number of changes made in the line */
short _regtop; /* Top and bottom of scrolling region */
short _regbottom;
};
Note for the mvwin() function. Only use this for newwin() windows not
subwin() windows as the latter point to the parent window. Moving a
window does not erase the previous copy, to do this touchwin() and
refresh() the underlaying window. Note that touchwin() refresh() is
likely to erase other overlaying windows which must be touchwin()ed and
refresh()ed.
If you are going to be doing much of this it is best to keep a tree
showing display structure. When a window is moved, touchwin and refresh
the window under the old location. When a window is touchwin() and
refresh()ed, touchwin() and refresh() any windows over it.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.