8202 doors man pages contain extra whitespace
[unleashed.git] / usr / src / man / man3xcurses / clearok.3xcurses
blob5e798348b9deb729dbdb0a42297b37ce3ef33ab4
1 '\" te
2 .\"  Copyright (c) 1990, 1995 by Mortice Kern Systems Inc.  All Rights Reserved  Portions Copyright (c) 1999, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH CLEAROK 3XCURSES "Jun 5, 2002"
7 .SH NAME
8 clearok, idlok, leaveok, scrollok, setscrreg, wsetscrreg \- terminal output
9 control functions
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
14 \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]
16 \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]
18 #include <curses.h>
20 \fBint\fR \fBclearok\fR(\fBWINDOW *\fR\fIwin\fR, \fBbool\fR \fIbf\fR);
21 .fi
23 .LP
24 .nf
25 \fBint\fR \fBidlok\fR(\fBWINDOW *\fR\fIwin\fR, \fBbool\fR \fIbf\fR);
26 .fi
28 .LP
29 .nf
30 \fBint\fR \fBleaveok\fR(\fBWINDOW *\fR\fIwin\fR, \fBbool\fR \fIbf\fR);
31 .fi
33 .LP
34 .nf
35 \fBint\fR \fBscrollok\fR(\fBWINDOW *\fR\fIwin\fR, \fBbool\fR \fIbf\fR);
36 .fi
38 .LP
39 .nf
40 \fBint\fR \fBsetscrreg\fR(\fBint\fR \fItop\fR, \fBint\fR \fIbot\fR);
41 .fi
43 .LP
44 .nf
45 \fBint\fR \fBwsetscrreg\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fItop\fR, \fBint\fR \fIbot\fR);
46 .fi
48 .SH DESCRIPTION
49 .sp
50 .LP
51 These functions set options that deal with the output within Curses functions.
52 .sp
53 .LP
54 The \fBclearok()\fR function assigns the value of \fIbf\fR to an internal flag
55 in the specified window that governs clearing of the screen during a refresh.
56 If, during a refresh operation on the specified window, the flag in
57 \fIcurscr\fR is \fBTRUE\fR or the flag in the specified window is \fBTRUE\fR,
58 \fBclearok()\fR clears the screen, redraws it in its entirety, and sets the
59 flag to \fBFALSE\fR in \fIcurscr\fR and in the specified window. The initial
60 state is unspecified
61 .sp
62 .LP
63 The \fBidlok()\fR function specifies whether the implementation may use the
64 hardware insert-line, delete-line, and scroll features of terminals so
65 equipped. If \fIbf\fR is \fBTRUE\fR, use of these features is enabled. If
66 \fIbf\fR is \fBFALSE\fR, use of these features is disabled and lines are
67 instead redrawn as required. The initial state is \fBFALSE\fR.
68 .sp
69 .LP
70 The \fBleaveok()\fR function controls the cursor position after a refresh
71 operation. If \fIbf\fR is \fBTRUE\fR, refresh operations on the specified
72 window may leave the terminal's cursor at an arbitrary position. If \fIbf\fR is
73 \fBFALSE\fR, then at the end of any refresh operation, the terminal's cursor is
74 positioned at the cursor position contained in the specified window. The
75 initial state is \fBFALSE\fR.
76 .sp
77 .LP
78 The \fBscrollok()\fR function controls the use of scrolling.If \fIbf\fR is
79 \fBTRUE\fR, then scrolling is enabled for the specified window. If \fIbf\fR is
80 \fBFALSE\fR, scrolling is disabled for the specified window. The initial state
81 is \fBFALSE\fR.
82 .sp
83 .LP
84 The \fBsetscrreg()\fR and \fBwsetscrreg()\fR functions define a software
85 scrolling region in the current or specified window. The \fItop\fR and
86 \fIbottom\fR arguments are the line numbers of the first and last line defining
87 the scrolling region. (Line 0 is the top line of the window.) If this option
88 and \fBscrollok()\fR are enabled, an attempt to move off the last line of the
89 margin causes all lines in the scrolling region to scroll one line in the
90 direction of the first line. Only characters in the window are scrolled. If a
91 software scrolling region is set and \fBscrollok()\fR is not enabled, an
92 attempt to move off the last line of the margin does not reposition any lines
93 in the scrolling region.
94 .SH PARAMETERS
95 .sp
96 .ne 2
97 .na
98 \fB\fIwin\fR\fR
99 .ad
100 .RS 7n
101 Is a pointer to a window.
105 .ne 2
107 \fB\fIbf\fR\fR
109 .RS 7n
110 Is a Boolean expression.
114 .ne 2
116 \fB\fItop\fR\fR
118 .RS 7n
119 Is the top line of the scrolling region (top of the window is line 0).
123 .ne 2
125 \fB\fIbot\fR\fR
127 .RS 7n
128 Is the bottom line of the scrolling region (top of the window is line 0).
131 .SH RETURN VALUES
134 Upon successful completion, the \fBsetscrreg()\fR and \fBwsetscrreg()\fR
135 functions return \fBOK\fR. Otherwise, they return \fBERR\fR.
138 The other functions always return \fBOK\fR.
139 .SH ERRORS
142 No errors are defined.
143 .SH  USAGE
146  The only reason to enable the \fBidlok()\fR feature is to use scrolling to
147 achieve the visual effect of motion of a partial window, such as for a screen
148 editor. In other cases, the feature can be visually annoying.
151 The \fBleaveok()\fR option provides greater efficiency for applications that do
152 not use the cursor.
153 .SH ATTRIBUTES
156 See \fBattributes\fR(5) for descriptions of the following attributes:
161 box;
162 c | c
163 l | l .
164 ATTRIBUTE TYPE  ATTRIBUTE VALUE
166 Interface Stability     Standard
168 MT-Level        Unsafe
171 .SH SEE ALSO
174 \fBbkgdset\fR(3XCURSES), \fBclear\fR(3XCURSES), \fBdoupdate\fR(3XCURSES),
175 \fBlibcurses\fR(3XCURSES), \fBscrl\fR(3XCURSES), \fBattributes\fR(5),
176 \fBstandards\fR(5)