[net.sources] Window doc #1 of 0-2

chris@umcp-cs.UUCP (07/06/83)

: Run this shell script with "sh" not "csh"
PATH=:/bin:/usr/bin:/usr/ucb
export PATH
all=FALSE
if [ $1x = -ax ]; then
	all=TRUE
fi
/bin/echo 'Extracting xab'
sed 's/^X//' <<'//go.sysin dd *' >xab
X.ff
X\fBWBscroll (\fIw\fB,\fR \fIrows\fB)
XWin *\fIw\fB;
Xint\fR \fIrows\fB;\fR
X.fe
XScrolls the buffer attached to window \fIw\fR forward by \fIrows\fR lines (or
Xbackward if \fIrows\fR is negative).  Text is lost at the top (bottom if
X\fIrows\fR is negative) and blanks are introduced at the bottom (top).  The
Xbuffer cursor is moved upward \fIrows\fR lines (downward -\fIrows\fR lines if
X\fIrows\fR is negative), which makes it stay over the same text.
X.ff
X\fBWBtoWcursor (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XMoves the buffer cursor of the buffer attached to window \fIw\fR to be over
Xthe same character that \fIw\fR's window cursor is over.  This can be used
Xto get the buffer cursor to the window cursor so that buffer operations
Xcan be performed at the window cursor's position.
X.ff
X\fBWCHAROF (\fIc\fB)
Xint\fR \fIc\fB;\fR
X.fe
XReturns the character element of \fIc\fR, as returned by \fBWAread\fR,
X\fBWBread\fR, or \fBWread\fR.  This is actually a macro which expands to
X.sp
X\fB((\fIc\fB) & 0377)\fR
X.sp
X(It may be system dependent, and require changing.)
X.ff
X\fBWMODEOF (\fIc\fB)
Xint\fR \fIc\fB;\fR
X.fe
XReturns the mode element of \fIc\fR, as returned by \fBWAread\fR, \fBWBread\fR, or
X\fBWread\fR.  This is actually a macro which expands to
X.sp
X\fB((\fIc\fB) >> NBPB)\fR
X.sp
X(It may be system dependent, and require changing.)
X.ff
X\fBWWcursor (\fIw\fB,\fR \fIrow\fB,\fR \fIcol\fB)
XWin *\fIw\fB;
Xint\fR \fIrow\fB,\fR \fIcol\fB;\fR
X.fe
XSets the position of the window cursor of window \fIw\fR to row \fIrow\fR,
Xcolumn \fIcol\fR.  \fIRow\fR and \fIcol\fR are clipped to be within the margins.
X(0, 0) is the upper left hand corner immediately inside the margin
Xsettings.  "WWcursor" stands for "Window Window-relative cursor move",
Xmeaning move the cursor to a point relative to the current window
Xposition; this function will never move the window over its buffer.
X.ff
X\fBWWtoBcursor (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XMoves the window cursor of the window \fIw\fR to be over the same character
Xthat \fIw\fR's buffer's buffer cursor is over.  This is actually a macro
Xthat expands to a \fBWAcursor\fR call, with many references to \fIw\fR; watch
Xout for side effects of things like \fBWWtoBcursor (w++)\fR.
X.ff
X\fBWaputc (\fIc\fB,\fR \fIm\fB,\fR \fIw\fB)
Xchar\fR \fIc\fB;
Xint\fR \fIm\fB;
XWin *\fIw\fB;\fR
X.fe
XPuts character \fIc\fR into \fIw\fR's winbuf at the aux cursor.  The character
Xis not interpreted in any way (e.g.  tab does not move to the next tab
Xstop).  The mode \fIm\fR may have any of the standard attributes (WBOLD,
XWBLINK, WULINE, WINVERSE), and one more, called WBUF, which means "I
Xsee through to the text buffer" (this is the "glass factor").  Modes in
Xthe window buffer are exclusive ored with modes in the text buffer if
Xthe WBUF bit is set; if not, the mode and character at that position
Xare put on the display.  Thus you can create a region of a window which
Xis always in inverse video, no matter what happens underneath.
X.ff
X\fBWaputs (\fIs\fB,\fR \fIm\fB,\fR \fIw\fB)
Xchar *\fIs\fB;
Xint\fR \fIm\fB;
XWin *\fIw\fB;\fR
X.fe
XPuts a C style (null terminated) string using \fBWaputc (*\fIs\fB,\fR \fIm\fB,\fR
X\fIw\fB)\fR on each character.
X.ff
X\fBWauxcursor (\fIw\fB,\fR \fIrow\fB,\fR \fIcol\fB)\fR\**
X.(f
X\**This function should have been called "Wacursor" for consistency,
Xbut I felt that that would confuse it with "WAcursor".
X.)f
X\fBWin *\fIw\fB;
Xint\fR \fIrow\fB,\fR \fIcol\fB;\fR
X.fe
XSets the position of the aux cursor to row \fIrow\fR, column \fIcol\fR.  (0, 0)
Xis the upper left hand corner.  \fIRow\fR and \fIcol\fR clipped to be within
Xthe window.
X.ff
X\fBWback (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XMoves window \fIw\fR to the "back" of the screen (i.e.  window \fIw\fR is
Xcovered by all other windows that it intersects).  This is the inverse
Xof \fBWfront\fR.
X.ff
X\fBWborder (\fIw\fB,\fR \fIulc\fB,\fR \fItop\fB,\fR \fIurc\fB,\fR \fIleft\fB,\fR \fIright\fB,\fR \fIllc\fB,\fR \fIbottom\fB,\fR \fIlrc\fB)
XWin *\fIw\fB;
Xchar\fR \fIulc\fB,\fR \fItop\fB,\fR \fIurc\fB,\fR \fIleft\fB,\fR \fIright\fB,\fR \fIllc\fB,\fR \fIbottom\fB,\fR \fIlrc\fB;\fR
X.fe
XBorders (frames) window \fIw\fR with the specified characters.  \fIulc\fR is
Xthe upper left corner; \fItop\fR is the top line, \fIurc\fR is the upper right
Xcorner, \fIleft\fR is the left side, \fIright\fR is the right side; \fIllc\fR is
Xthe lower left corner; and \fIlrc\fR is the lower right corner.  If they
Xare not already, margins are set so that the frame characters are
Xoff-limits to window operations.  When a window is framed, a subsequent
Xlabel operation (see \fBWlabel\fR) will leave the left and right corners
Xuntouched, but overwrite the top or bottom frame characters.  Normally
X\fBWframe\fR is used to frame windows; this call allows non-standard frame
Xcharacters.
X.ff
X\fBWbox (\fIxorg\fB,\fR \fIyorg\fB,\fR \fIxext\fB,\fR \fIyext\fB)
Xint\fR \fIxorg\fB,\fR \fIyorg\fB,\fR \fIxext\fB,\fR \fIyext\fB;\fR
X.fe
XArranges for the box to be drawn on the screen at (\fIxorg\fR, \fIyorg\fR) and
Xto be \fIxext\fR columns by \fIyext\fR rows.  \fIXorg\fR and \fIyorg\fR are clipped
Xto be on the screen; \fIxext\fR and \fIyext\fR are clipped to make the box fit.
X(0, 0) is the upper left hand corner of the screen.  To turn off the
Xbox, set the variable \fBWBoxActive\fR to zero.
X.ff
X\fBWin *Wboxfind ()\fR
X.fe
XFinds which window the box is in.  Returns zero if the box is not
Xcontained in a visible window.  If the box is contained in a visible
Xwindow the current window is set to this window.  If the position of
Xthe box is ambiguous (i.e. it is visibly in one window, but also
Xwithin covered sections of other windows), the topmost window (the
Xone in which it is visible) is selected.  For the purpose of this
Xfunction, the box is considered to be a point at its upper left corner.
X.ff
X\fBWclear (\fIw\fB,\fR \fIhowto\fB)
XWin *\fIw\fB;
Xint\fR \fIhowto\fB;\fR
X.fe
XClears window \fIw\fR.  The characters in window \fIw\fR's winbuf are set to
X"glass"; all of the visible characters in \fIw\fR's text buffer are set to
Xblanks.  If \fIhowto\fR is two, the entire window/visible area is cleared.
XIf \fIhowto\fR is one, the area from the beginning of the window to the
Xwindow cursor is cleared, not including the character under the window
Xcursor.  Otherwise, the area from the cursor to the end of the window
Xis cleared, including the character under the window cursor.
X.ff
X\fBWclearline (\fIw\fB,\fR \fIhowto\fB)
XWin *\fIw\fB;
Xint\fR \fIhowto\fB;\fR
X.fe
XClears the current (cursor) line of window \fIw\fR.  The characters in
Xwindow \fIw\fR's winbuf are set to "glass"; the visible characters of the
Xcurrent line in \fIw\fR's text buffer are set to blanks.  If \fIhowto\fR is
Xtwo, the entire line is cleared.  If \fIhowto\fR is one, the area from the
Xbeginning of the line to the cursor is cleared, not including the
Xcharacter under the cursor.  Otherwise, the area from the cursor to the
Xend of the window is cleared, including the character under the cursor.
X.ff
X\fBWclose (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XCloses window \fIw\fR.  Its buffer, if not still in use by another window,
Xis destroyed.  In any case all of the winbuf contents and the window
Xdescriptor are destroyed.  Closing the current window makes the window
Xlibrary choose the frontmost window as the new current window.
X.ff
X\fBWcloseall ()\fR
X.fe
XCloses all open windows, using \fBWclose\fR on each one.
X.ff
X\fBWcurdown (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XMoves the window cursor in window \fIw\fR down \fIn\fR lines, possibly scrolling
Xthe window upward so as to keep the cursor within the window.  This is
Xactually a macro that calls \fBWAcursor\fR; watch out for side effects.
X.ff
X\fBWcurleft (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XMoves the window cursor in window \fIw\fR left \fIn\fR characters, possibly
Xscrolling the window to the right so as to keep the cursor within the
Xwindow.  This is actually a macro that calls \fBWAcursor\fR; watch out for
Xside effects.
X.ff
X\fBWcurright (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XMoves the window cursor in window \fIw\fR right \fIn\fR characters, possibly
Xscrolling the window to the left so as to keep the cursor within the
Xwindow.  This is actually a macro that calls \fBWAcursor\fR; watch out for
Xside effects.
X.ff
X\fBWcurup (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XMoves the window cursor in window \fIw\fR up \fIn\fR lines, possibly scrolling
Xthe window downward so as to keep the cursor within the window.  This
Xis actually a macro that calls \fBWAcursor\fR; watch out for side effects.
X.ff
X\fBWdelchars (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XDeletes \fIn\fR characters at the window cursor position in the text buffer
Xattached to window \fIw\fR.  Also deletes \fIn\fR characters from \fIw\fR's winbuf,
Xat the window cursor.
X.ff
X\fBWdelcols (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XDeletes \fIn\fR columns at the window cursor column in the text buffer
Xattached to window \fIw\fR.  Also deletes \fIn\fR characters from \fIw\fR's winbuf.
XIn effect, calls \fBWdelchars\fR on each line within the margins.
X.ff
X\fBWdellines (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XDeletes \fIn\fR lines from the text buffer attached to window \fIw\fR at \fIw\fR's
Xwindow cursor row.  Also deletes \fIn\fR lines from \fIw\fR's winbuf, at the
Xwindow cursor.
X.ff
X\fBWfiledump (\fIfile\fB)
Xchar *\fIfile\fB;\fR
X.fe
XDumps the current virtual screen (what the screen would look like if it
Xwere \fBWrefresh\fRed) to the named file.  If the file existed previously
Xit is overwritten.  See Appendix 5 for the dump file format.
X.ff
X\fBWin *Wfind (\fIid\fB)
Xint\fR \fIid\fB;\fR
X.fe
XSearches for the window with id \fIid\fR and if found, makes is the current
Xone.  A pointer to the found window is returned, or 0 if the specified
Xwindow cannot be found.  If \fIid\fR is not unique, the frontmost window
Xwith that id (i.e.  the window that if not hidden would cover the
Xothers) is returned.
X.ff
X\fBWframe (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XFrames window w with the default frame characters.  Normally these are
X\&'+', '-', '+', '|', '|', '+', '-', '+' but on VT100s and some other
Xterminals you get cute little corners and lines.  See \fBWborder\fR.
X.ff
X\fBWfront (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XMoves window \fIw\fR to the "front" of the screen (i.e.  window \fIw\fR covers
Xall other windows that it intersects).  This applies equally to hidden
Xwindows except that hidden windows never cover others.  If a hidden
Xwindow that has been \fBWfront\fRed is unhidden, it will cover all other
Xwindows.
X.ff
X\fBWgetframe (\fIulc\fB,\fR \fItop\fB,\fR \fIurc\fB,\fR \fIleft\fB,\fR \fIright\fB,\fR \fIllc\fB, \fIbottom\fB,\fR \fIlrc\fB)
Xchar *\fIulc\fB, *\fItop\fB, *\fIurc\fB, *\fIleft\fB, *\fIright\fB, *\fIllc\fB, *\fIbottom\fB, *\fIlrc\fB;\fR
X.fe
XReturns in the appropriate \fBchar *\fR elements the default frame
Xcharacters (the ones used by \fBWframe\fR).  This information can be used
Xto border a window on two sides, for example.  See \fBWborder\fR, \fBWframe\fR,
X\fBWsetframe\fR.
X.ff
X\fBWhide (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XHides window \fIw\fR.
X.ff
X\fBWinschars (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XInserts \fIn\fR blanks into the current (cursor) line of the text buffer
Xattached to window \fIw\fR at the window cursor position.  Also inserts \fIn\fR
Xblanks in \fIw\fR's winbuf, at the window cursor.
X.ff
X\fBWinscols (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XInserts \fIn\fR columns of blanks at the window cursor column in the text
Xbuffer attached to window \fIw\fR.  Also inserts \fIn\fR characters in \fIw\fR's
Xwinbuf.  In effect, calls \fBWinschars\fR on each line within the margins.
X.ff
X\fBWinslines (\fIw\fB,\fR \fIn\fB)
XWin *\fIw\fB;
Xint\fR \fIn\fB;\fR
X.fe
XInserts \fIn\fR blank lines into the text buffer attached to window \fIw\fR at
X\fIw\fR's window cursor row.  Also inserts \fIn\fR lines into \fIw\fR's winbuf, at
Xthe window cursor.
X.ff
X\fBWlabel (\fIw\fB,\fR \fIlabel\fB,\fR \fIbottom\fB,\fR \fIcenter\fB)
XWin *\fIw\fB;
Xchar *\fIlabel\fB;
Xint\fR \fIbottom\fB,\fR \fIcenter\fB;\fR
X.fe
XLabels the window.  The characters in \fIlabel\fR (or as many as will fit)
Xare written into the uppermost line of \fIw\fR (or the lowermost line if
X\fIbottom\fR is nonzero), centered if \fIcenter\fR is nonzero, and dumped into
Xthe winbuf in the current mode but with reverse video inverted (in
Xreverse video if the current mode is normal, or vice versa).  If they
Xare not already, margins are set so that the label is off-limits to
Xwindow operations.  If the window has been \fBWframe\fRd or \fBWborder\fRed,
Xthe label does not touch the left and right edges of the window;
Xotherwise it spans the entire width available.
X.ff
X\fBWin *Wlink (\fIew\fB,\fR \fIid\fB,\fR \fIxorg\fB,\fR \fIyorg\fB,\fR \fIxext\fB,\fR \fIyext\fB,\fR \fIbcols\fB,\fR \fIbrows\fB)
XWin *\fIew\fB;
Xint\fR \fIid\fB,\fR \fIxorg\fB,\fR \fIyorg\fB,\fR \fIxext\fB,\fR \fIyext\fB,\fR \fIbcols\fB,\fR \fIbrows\fB;\fR
X.fe
XCreates a link to the existing window \fIew\fR.  In all other respects this
Xfunction is like \fBWopen\fR, except that since the new window is linked to
Xanother it shares the other's buffer.  See \fBWopen\fR.
X.ff
X\fBWmove (\fIw\fB,\fR \fIxorg\fB,\fR \fIyorg\fB)
XWin *\fIw\fB;
Xint\fR \fIxorg\fB,\fR \fIyorg\fB;\fR
X.fe
XMoves window \fIw\fR to coordinates (\fIxorg\fR, \fIyorg\fR).  (0, 0) is the upper
Xleft corner.  Zero is returned if the window is successfully moved;
Xotherwise it did not fit at the specified coordinates.  Window \fIw\fR
Xremains at the same depth it used to be; i.e.  if it still overlaps
Xanother window, the one covered will remain the same, although the area
Xcovered changes.
X.ff
X\fBWnewline (\fIw\fB,\fR \fIon\fB)
XWin *\fIw\fB;
Xint\fR \fIon\fB;\fR
X.fe
XTurns auto-newline mode (CR/LF mapping) on or off for window \fIw\fR.  If
X\fIon\fR is nonzero, auto-newline is turned on (either CR or LF will
Xperform the actions of both), otherwise it is turned off.  This is a
Xmacro; beware of side effects.
X.ff
X\fBWoncursor (\fIw\fB,\fR \fIon\fB)
XWin *\fIw\fB;
Xint\fR \fIon\fB;\fR
X.fe
XTurns the window cursor for window \fIw\fR on or off.  If \fIon\fR is nonzero
Xthe cursor is turned on, otherwise it is turned off.  When on, it is
Xvisible as a blinking block.
X.ff
X\fBWin *Wopen (\fIid\fB,\fR \fIxorg\fB,\fR \fIyorg\fB,\fR \fIxext\fB,\fR \fIyext\fB,\fR \fIbcols\fB,\fR \fIbrows\fB)
Xint\fR \fIid\fB,\fR \fIxorg\fB,\fR \fIyorg\fB,\fR \fIxext\fB,\fR \fIyext\fB,\fR \fIbcols\fB,\fR \fIbrows\fB;\fR
X.fe
XReturns a pointer to a new window, created with id number \fIid\fR, at
X(\fIxorg\fR, \fIyorg\fR) on the screen, \fIxext\fR columns by \fIyext\fR rows, with a
Xbuffer at least as big as the window but possible larger, if \fIbcols\fR
Xand/or \fIbrows\fR are larger than \fIxext\fR and \fIyext\fR.  If the creation
Xfails for any reason, 0 is returned.  The new window is always on top
Xof all other windows (i.e.  if it overlaps another, it covers the
Xother).  The actual value of \fIid\fR is ignored; it's just a value for
X\fBWfind\fR to find, or for the programmer's use.  The new window is made
Xthe current window.
X.ff
X\fBWputc (\fIc\fB,\fR \fIw\fB)\fR\**
X.(f
X\**Again, the window parameter comes \fIlast\fR.
X.)f
X\fBchar\fR \fIc\fB;
XWin *\fIw\fB;\fR
X.fe
XPuts a character (\fIc\fR) to the text buffer attached to window \fIw\fR at the
Xwindow cursor, and advances the window cursor, as described in the
Xsection on printing characters.
X.ff
X\fBWputs (\fIs\fB,\fR \fIw\fB)
Xchar *\fIs\fB;
XWin *\fIw\fB;\fR
X.fe
XPuts a C style (null terminated) string into the text buffer attached
Xto window \fIw\fR, by using \fBWputc\fR on each character in \fIs\fR.
X.ff
X\fBWread (\fIw\fB,\fR \fIcharonly\fB,\fR \fIwinonly\fB)
XWin *\fIw\fB;
Xint\fR \fIcharonly\fB,\fR \fIwinonly\fB;\fR
X.fe
XReads back a character and (unless \fIcharonly\fR is nonzero) its mode from
Xwindow \fIw\fR at the \fIw\fR's window cursor position.  If the character
Xdisplayed would come from the winbuf (i.e.  the winbuf does not contain
Xglass at the window cursor position), the character is fetched from
Xthere.  If the character displayed would come from the text buffer, the
Xcharacter is fetched from there unless \fIwinonly\fR is set (when it will
Xcome from the winbuf).  In any case, the window cursor is subsequently
Xadvanced with wraparound from the last character of the last line to
Xthe first character of the first line.  See \fBWCHAROF\fR and \fBWMODEOF\fR.
X.ff
X\fBWrefresh (\fISkipInputCheck\fB)
Xint\fR \fISkipInputCheck\fB;\fR
X.fe
XUpdates the physical screen.  If \fISkipInputCheck\fR is zero, input is
Xchecked for before anything is done, and if input is pending nothing is
Xdone.  (Input is defined as "the number of characters that can be read
Xfrom file descriptor 0 is nonzero.")  Normally, \fISkipInputCheck\fR should
Xbe given as zero for interactive programs, so that they don't waste
Xtime updating the display if it's about to change anyway.  If
X\fISkipInputCheck\fR is nonzero input will not be checked for and the
Xscreen will be updated regardless of pending input.\**
X.(f
X\**I'm not sure what happens if input is already known to be pending.
X.)f
X.pp
XUnless the variable \fBScreenGarbaged\fR has been set, the update will be
Xdone by changing as few characters on the physical screen as possible.
X\fBScreenGarbaged\fR should be set if the screen has been written to by
Xsome external process.  Often in an interactive program some key (e.g.
Xcontrol-L) will simply set \fBScreenGarbaged\fR and then call \fBWrefresh\fR.
X\fBScreenGarbaged\fR is automatically cleared by \fBWrefresh\fR.
X.ff
X\fBWrelscroll (\fIw\fB,\fR \fIrows\fB,\fR \fIcols\fB,\fR \fIcwin\fB)
XWin *\fIw\fB;
Xint\fR \fIrows\fB,\fR \fIcols\fB,\fR \fIcwin\fB;\fR
X.fe
XMoves window \fIw\fR over its buffer.  The window is moved \fIrows\fR lines
Xforward (or backward if \fIrows\fR is negative) and \fIcols\fR columns to the
Xright (or left if \fIcols\fR is negative) over its buffer.  The window can
Xnever be moved "off the edge" of the buffer to the left or right.  If
Xthe window is moved past the top or bottom edge of the buffer, however,
Xthe buffer is scrolled (as in \fBWBscroll\fR) as necessary to keep window
X\fIw\fR within it.  If \fIcwin\fR is set, the cursor "sticks to" the window
Xrather than to the buffer; that is, the cursor's position relative to
Xthe window remains the same.  Otherwise the cursor sticks to the
Xbuffer; that is, the cursor's position relative to the buffer remains
Xthe same\**, or in other words, the cursor stays over the same text it
Xused to be over.
X.(f
X\**If possible.  The cursor is constrained to remain within the inner
Xmargins of the window.
X.)f
X.ff
X\fBWretroline (\fIw\fB,\fR \fImode\fB,\fR \fIinwin\fB)
XWin *\fIw\fB;\fR
X.fe
XSets all of the characters in the current (cursor) line of the window
X\fIw\fR to the specified \fImode\fR.  \fIInwin\fR specifies whether the mode-paint
Xis to be applied to the text buffer (if zero) or to the window buffer
X(if nonzero).  If applied to the text buffer, all the characters in the
Xtext buffer attached to window \fIw\fR at its buffer cursor line will be
Xpainted.  If applied to the winbuf, the characters in the winbuf (be
Xthey glass or normal) will be painted with mode \fImode\fR.  Painting the
Xwinbuf results in "tinted glass"; that is, if the window is scrolled,
Xthe mode applies to a new line in the text buffer.  Painting in the
Xbuffer results in modes that "stick to" the text; if the window is
Xscrolled, the mode moves with the characters.  This function is
Xdesigned for menus, where the current line of the menu would be in
Xreverse video, for example.
X.ff
X\fBWscreensize (\fIrows\fB,\fR \fIcols\fB)
Xint *\fIrows\fB, *\fIcols\fB;\fR
X.fe
XSets *\fIrows\fR to the number of rows on the physical screen and *\fIcols\fR
Xto the number of columns.  These values specify the largest legal size
Xfor windows and the box.
X.ff
X\fBWscroll (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XScrolls window \fIw\fR by its popup (normally one).  If the window's popup
Xis zero it rolls the cursor over from the bottom line to the top, and
Xclears each line as it goes along.  This is much faster on some
Xterminals, but is at least a little confusing.  This function is mainly
Xfor internal use, but may be called if desired.  Normally \fBWrelscroll\fR
X(which does the real work for \fBWscroll\fR anyway) should be called.
X.ff
X\fBWsetbuf (\fIw\fB,\fR \fIbcols\fB,\fR \fIbrows\fB)
XWin *\fIw\fB;
Xint\fR \fIbcols\fB,\fR \fIbrows\fB;\fR
X.fe
XSets the size of the text buffer attached to window \fIw\fR.  The buffer
Xsize is made \fBat least\fR \fIbrows\fR rows by \fIbcols\fR columns.  Text buffers
Xnever shrink, so this is really a "grow text buffer" call.
X.ff
X\fBWsetframe (\fIulc\fB,\fR \fItop\fB,\fR \fIurc\fB,\fR \fIleft\fB,\fR \fIright\fB,\fR \fIllc\fB,\fR \fIbottom\fB,\fR \fIlrc\fB)
Xchar\fR \fIulc\fB,\fR \fItop\fB,\fR \fIurc\fB,\fR \fIleft\fB,\fR \fIright\fB,\fR \fIllc\fB,\fR \fIbottom\fB,\fR \fIlrc\fB;\fR
X.fe
XSets the default frame characters (the ones used by \fBWframe\fR).  This
Xfunction is probably not very useful, but is the only way to change the
Xdefault frames.
X.ff
X\fBWsetmargins (\fIw\fB,\fR \fIinxorg\fB,\fR \fIinxext\fB,\fR \fIinyorg\fB,\fR \fIinyext\fB)
XWin *\fIw\fB;
Xint\fR \fIinxorg\fB,\fR \fIinxext\fB,\fR \fIinyorg\fB,\fR \fIinyext\fB;\fR
X.fe
XSets the margins to the specified values.  \fIInxorg\fR and \fIinyorg\fR
Xspecify at what x and y values (relative to the window origin at (0,
X0)) the inner area begins; \fIinxext\fR and \fIinyext\fR specify how many
Xcharacters in each direction are accessible.  The inner area is set to
Xcome from the text buffer, and the outer area to come from the window
Xbuffer.  If the margins are set to the full size of the window,
Xsubsequent \fBWlabel\fR calls will use the leftmost and rightmost
Xcharacters, unless \fBWframe\fR or \fBWborder\fR is called.  (See \fBWborder\fR,
X\fBWlabel\fR.)
X.ff
X\fBWsetmode (\fIw\fB,\fR \fIm\fB)
XWin *\fIw\fB;
Xint\fR \fIm\fB;\fR
X.fe
XSets the mode for window \fIw\fR.  \fIM\fR is any combination of the constants
XWBOLD, WULINE, WBLINK, and WINVERSE, which represent (respectively)
Xbold, underscore, blink, and inverse video.  The values can be added or
Xboolean ored for combinations.  This is a macro; beware of side
Xeffects.
X.ff
X\fBWsetpopup (\fIw\fB,\fR \fIp\fB)
XWin *\fIw\fB;
Xint\fR \fIp\fB;\fR
X.fe
XSets the popup for window \fIw\fR to \fIp\fR.  The popup value is the number of
Xlines to scroll upward when the cursor moves off the bottom of the
Xwindow via a newline (or carriage return if CR/LF mapping is on).  If
Xthe popup value is zero, the cursor moves to the top of the window and
Xclears a line at a time, instead of scrolling.  This is faster on some
Xterminals, but can be confusing.  This is a macro, beware of side
Xeffects.
X.ff
X\fBWsize (\fIw\fB,\fR \fIxext\fB,\fR \fIyext\fB)
XWin *\fIw\fB;
Xint\fR \fIxext\fB,\fR \fIyext\fB;\fR
X.fe
XSets the size of window \fIw\fR to \fIxext\fR columns by \fIyext\fR rows.  The
Xmargins are set to make the entire winbuf the inside area, and the
Xentire winbuf is set to glassy blanks.
X.ff
X\fBWunhide (\fIw\fB)
XWin *\fIw\fB;\fR
X.fe
XUnhides window \fIw\fR.
X.ff
X\fBWwrap (\fIw\fB,\fR \fIon\fB)
XWin *\fIw\fB;
Xint\fR \fIon\fB;\fR
X.fe
XTurns autowrap on or off for window \fIw\fR.  If \fIon\fR is nonzero, autowrap
Xis turned on, otherwise it is turned off.  See the section on printing
Xcharacters.
X.ff
X\fBbcopy (\fIfrom\fB,\fR \fIto\fB,\fR \fIcount\fB)
Xchar *\fIfrom\fB, *\fIto\fB;
Xint\fR \fIcount\fB;\fR
X.fe
XBlock copy of \fIcount\fR bytes (0 <= \fIcount\fR <= 65535) from address \fIfrom\fR
Xto address \fIto\fR.  This is used internally and is provided only because
Xit's a fast block copy.
X.\" ***************** END OF MAIN TEXT ***********************
X.bp
X.sp 4
X\fIAcknowledgements\fR
X.pp
XThe original display optimization algorithm was written by James
XGosling
X[Gosling 81].
XAn earlier version of the window package was written by Rich Wood
X[Wood 82].
XThe complaints of Mark Weiser and Randy Trigg inspired me to write this
Xversion.
X.\" ******************* REFERENCES ***********************
X.if \\n($m=1 .bp  \" start new page unless in 2 column mode
X.uh "REFERENCES"
X.in 5
X.ls 1
X.de ][
X.if \\$1>5 .tm Bad arg to []
X.sp
X.ti 0
X.\" if !"\\*([F"" [\\*([F]\t\c     this is the way it used to be
X.if !"\\*([F"" [\\*([F] \" these two lines are to get a line break after flag
X.br
X\.[\\$1
X..
X. \" ******* stuff for references
X.de [<
X.]<
X..
X.de ]<
X.in 5
X.ta 5
X..
X.de [>
X.]>
X..
X.de ]>
X.sp
X..
X.de [-
X.]-
X..
X.de ]-
X.rm [A [B [C [D [E [I [N [O [P [Q [R [V [T [W
X..
X.
X.
X.de [0 \" other
X.if !"\\*([Q"" \\*([Q,
X.if !"\\*([W"$$ignoreauthor" .if !"\\*([A"" \\*([A,
X.if !"\\*([T"" \\*([T\c
X.if !"\\*([T"" .if !"\\*([O"" ,\ 
X.ie !"\\*([O"" \\*([O
X.el .if !"\\*([T"" \&.
X.if !"\\*([D"" \\*([D.
X..
X.de [1 \" journal article
X.if !"\\*([Q"" \\*([Q,
X.if !"\\*([W"$$ignoreauthor" .if !"\\*([A"" \\*([A,
X.if !"\\*([T"" \\*([o\\*([T,\\*([c
X.ul
X.ie !"\\*([V"" \\*([J \\*([V,
X.el \\*([J,
X.if !"\\*([N"" \\*([N,
X.if !"\\*([E"" ed. \\*([E,
X.if !"\\*([C"" \\*([C,
X.if !"\\*([P"" \{\
X.ie \\n([P>0 pp.\&
X.el p.\&
X\\*([P,\}
X.if !"\\*([I"" .if "\\*([R"" \\*([I,
X\\*([D.
X.if !"\\*([O"" \\*([O
X..
X.de [2 \" book
X.if !"\\*([Q"" \\*([Q,
X.if !"\\*([W"$$ignoreauthor" .if !"\\*([A"" \\*([A,
X.if !"\\*([E"" \\*([E, (ed.)
X.ul
X\\*([T,
X\\*([I,
X.if !"\\*([C"" \\*([C,
X\\*([D.
X.if !"\\*([O"" \\*([O
X..
X.de [3 \" article in book
X.if !"\\*([Q"" \\*([Q,
X.if !"\\*([W"$$ignoreauthor" .if !"\\*([A"" \\*([A,
X\\*([o\\*([T,\\*([c
X.if !"\\*([P"" pp. \\*([P
Xin
X.ul
X\\*([B,
X.if !"\\*([E"" ed. \\*([E,
X.if !"\\*([I"" \\*([I,
X.if !"\\*([C"" \\*([C,
X\\*([D.
X.if !"\\*([O"" \\*([O
X..
X.de [4 \" report
X.if !"\\*([Q"" \\*([Q,
X.if !"\\*([W"$$ignoreauthor" .if !"\\*([A"" \\*([A,
X\\*([o\\*([T,\\*([c
X\\*([R\c
X.if !"\\*([G"" \& (\\*([G)\c
X\&,
X.if !"\\*([I"" \\*([I,
X.if !"\\*([C"" \\*([C,
X\\*([D.
X.if !"\\*([O"" \\*([O
X..
X.de [5 \" tm style
X.if !"\\*([Q"" \\*([Q,
X.if !"\\*([W"$$ignoreauthor" .if !"\\*([A"" \\*([A,
X\\*([T,
X.ie \\n(TN \\*([M.
X.el Bell Laboratories internal memorandum (\\*([D).
X..
X.\" I think I can leave this out for now.  6/12/81
X.\" .[
X.\" $LIST$
X.\" .]
X.]<
X.\"Gosling.J.-1981-12-1
X.ds [F Gosling 81
X.]-
X.ds [A Gosling, J.
X.ds [T UNIX EMACS
X.ds [R Dept. of Computer Science, Carnegie-Mellon Univ. TR
X.ds [D Dec. 1981
X.ds [L Gosling 81
X.nr [T 0
X.nr [A 1
X.nr [O 0
X.][ 4 tech-report
X.\"Joy.W.N.-1981-06-2
X.ds [F Joy et al 81
X.]-
X.ds [A Joy, W.N.
X.as [A ", Farby, R.S.
X.as [A ", and Sklower, K.
X.ds [T UNIX Programmer's Manual
X.ds [I Dept. of Electrical Engineering and Computer Science, Univ. of California
X.ds [C Berkeley, CA
X.ds [D June 1981
X.ds [L Joy et al 81
X.nr [T 0
X.nr [A 1
X.nr [O 0
X.][ 2 book
//go.sysin dd *
made=TRUE
if [ $made = TRUE ]; then
	/bin/chmod 644 xab
	/bin/echo -n '	'; /bin/ls -ld xab
fi
-- 
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs
ARPA:	chris.umcp-cs@UDel-Relay