1 /* Public Domain Curses */
5 RCSID("$Id: outopts.c,v 1.39 2008/07/14 12:22:13 wmcbrine Exp $")
7 /*man-start**************************************************************
12 int clearok(WINDOW *win, bool bf);
13 int idlok(WINDOW *win, bool bf);
14 void idcok(WINDOW *win, bool bf);
15 void immedok(WINDOW *win, bool bf);
16 int leaveok(WINDOW *win, bool bf);
17 int setscrreg(int top, int bot);
18 int wsetscrreg(WINDOW *win, int top, int bot);
19 int scrollok(WINDOW *win, bool bf);
21 int raw_output(bool bf);
24 With clearok(), if bf is TRUE, the next call to wrefresh() with
25 this window will clear the screen completely and redraw the
28 immedok(), called with a second argument of TRUE, causes an
29 automatic wrefresh() every time a change is made to the
32 Normally, the hardware cursor is left at the location of the
33 window being refreshed. leaveok() allows the cursor to be
34 left wherever the update happens to leave it. It's useful
35 for applications where the cursor is not used, since it reduces
36 the need for cursor motions. If possible, the cursor is made
37 invisible when this option is enabled.
39 wsetscrreg() sets a scrolling region in a window; "top" and
40 "bot" are the line numbers for the top and bottom margins. If
41 this option and scrollok() are enabled, any attempt to move off
42 the bottom margin will cause all lines in the scrolling region
43 to scroll up one line. setscrreg() is the stdscr version.
45 idlok() and idcok() do nothing in PDCurses, but are provided for
46 compatibility with other curses implementations.
48 raw_output() enables the output of raw characters using the
49 standard *add* and *ins* curses functions (that is, it disables
50 translation of control characters).
53 All functions return OK on success and ERR on error.
55 Portability X/Open BSD SYS V
66 **man-end****************************************************************/
68 int clearok(WINDOW
*win
, bool bf
)
70 PDC_LOG(("clearok() - called\n"));
80 int idlok(WINDOW
*win
, bool bf
)
82 PDC_LOG(("idlok() - called\n"));
87 void idcok(WINDOW
*win
, bool bf
)
89 PDC_LOG(("idcok() - called\n"));
92 void immedok(WINDOW
*win
, bool bf
)
94 PDC_LOG(("immedok() - called\n"));
100 int leaveok(WINDOW
*win
, bool bf
)
102 PDC_LOG(("leaveok() - called\n"));
114 int setscrreg(int top
, int bottom
)
116 PDC_LOG(("setscrreg() - called: top %d bottom %d\n", top
, bottom
));
118 return wsetscrreg(stdscr
, top
, bottom
);
121 int wsetscrreg(WINDOW
*win
, int top
, int bottom
)
123 PDC_LOG(("wsetscrreg() - called: top %d bottom %d\n", top
, bottom
));
125 if (win
&& 0 <= top
&& top
<= win
->_cury
&&
126 win
->_cury
<= bottom
&& bottom
< win
->_maxy
)
129 win
->_bmarg
= bottom
;
137 int scrollok(WINDOW
*win
, bool bf
)
139 PDC_LOG(("scrollok() - called\n"));
149 int raw_output(bool bf
)
151 PDC_LOG(("raw_output() - called\n"));