1clearok(3XCURSES)       X/Open Curses Library Functions      clearok(3XCURSES)
2
3
4

NAME

6       clearok,  idlok,  leaveok,  scrollok,  setscrreg, wsetscrreg - terminal
7       output control functions
8

SYNOPSIS

10       cc [ flag... ] file... -I /usr/xpg4/include  -L  /usr/xpg4/lib \
11        -R  /usr/xpg4/lib  -lcurses  [ library... ]
12
13       c89 [ flag... ] file... -lcurses [ library... ]
14
15       #include <curses.h>
16
17       int clearok(WINDOW *win, bool bf);
18
19
20       int idlok(WINDOW *win, bool bf);
21
22
23       int leaveok(WINDOW *win, bool bf);
24
25
26       int scrollok(WINDOW *win, bool bf);
27
28
29       int setscrreg(int top, int bot);
30
31
32       int wsetscrreg(WINDOW *win, int top, int bot);
33
34

DESCRIPTION

36       These functions set options that deal with  the  output  within  Curses
37       functions.
38
39
40       The  clearok()  function assigns the value of bf to an internal flag in
41       the specified window that governs  clearing  of  the  screen  during  a
42       refresh.  If,  during  a refresh operation on the specified window, the
43       flag in curscr is TRUE or the flag in the  specified  window  is  TRUE,
44       clearok()  clears  the screen, redraws it in its entirety, and sets the
45       flag to FALSE in curscr and in the specified window. The initial  state
46       is unspecified
47
48
49       The  idlok()  function specifies whether the implementation may use the
50       hardware insert-line, delete-line, and scroll features of terminals  so
51       equipped.  If  bf  is  TRUE, use of these features is enabled. If bf is
52       FALSE, use of these features is disabled and lines are instead  redrawn
53       as required. The initial state is FALSE.
54
55
56       The  leaveok()  function  controls  the cursor position after a refresh
57       operation. If bf is TRUE, refresh operations on  the  specified  window
58       may  leave  the  terminal's  cursor  at an arbitrary position. If bf is
59       FALSE, then at the end of any refresh operation, the terminal's  cursor
60       is positioned at the cursor position contained in the specified window.
61       The initial state is FALSE.
62
63
64       The scrollok() function controls the use of scrolling.If  bf  is  TRUE,
65       then  scrolling  is  enabled  for the specified window. If bf is FALSE,
66       scrolling is disabled for the specified window. The  initial  state  is
67       FALSE.
68
69
70       The  setscrreg() and wsetscrreg() functions define a software scrolling
71       region in the current or specified window. The top and bottom arguments
72       are  the line numbers of the first and last line defining the scrolling
73       region. (Line 0 is the top line of the  window.)  If  this  option  and
74       scrollok()  are  enabled,  an  attempt to move off the last line of the
75       margin causes all lines in the scrolling region to scroll one  line  in
76       the  direction  of  the  first  line. Only characters in the window are
77       scrolled. If a software scrolling region is set and scrollok()  is  not
78       enabled,  an  attempt  to move off the last line of the margin does not
79       reposition any lines in the scrolling region.
80

PARAMETERS

82       win    Is a pointer to a window.
83
84
85       bf     Is a Boolean expression.
86
87
88       top    Is the top line of the scrolling region (top of  the  window  is
89              line 0).
90
91
92       bot    Is the bottom line of the scrolling region (top of the window is
93              line 0).
94
95

RETURN VALUES

97       Upon successful completion, the setscrreg() and wsetscrreg()  functions
98       return OK. Otherwise, they return ERR.
99
100
101       The other functions always return OK.
102

ERRORS

104       No errors are defined.
105

USAGE

107        The  only  reason to enable the idlok() feature is to use scrolling to
108       achieve the visual effect of motion of a partial window, such as for  a
109       screen editor. In other cases, the feature can be visually annoying.
110
111
112       The  leaveok() option provides greater efficiency for applications that
113       do not use the cursor.
114

ATTRIBUTES

116       See attributes(5) for descriptions of the following attributes:
117
118
119
120
121       ┌─────────────────────────────┬─────────────────────────────┐
122       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
123       ├─────────────────────────────┼─────────────────────────────┤
124       │Interface Stability          │Standard                     │
125       ├─────────────────────────────┼─────────────────────────────┤
126       │MT-Level                     │Unsafe                       │
127       └─────────────────────────────┴─────────────────────────────┘
128

SEE ALSO

130       bkgdset(3XCURSES),         clear(3XCURSES),         doupdate(3XCURSES),
131       libcurses(3XCURSES), scrl(3XCURSES), attributes(5), standards(5)
132
133
134
135SunOS 5.11                        5 Jun 2002                 clearok(3XCURSES)
Impressum