parent
b469b163b9
commit
d4f82864b6
|
@ -233,7 +233,7 @@ the corners are left blank to avoid a scroll.
|
||||||
.De
|
.De
|
||||||
Check if terminal can change colors.
|
Check if terminal can change colors.
|
||||||
.Ds
|
.Ds
|
||||||
.Fn cbreak "" \(dg
|
.Fn cbreak ""
|
||||||
.De
|
.De
|
||||||
Set the terminal to cbreak mode.
|
Set the terminal to cbreak mode.
|
||||||
.Ds
|
.Ds
|
||||||
|
@ -1128,7 +1128,7 @@ Thus, to get a new window of dimensions
|
||||||
use
|
use
|
||||||
.Fn newwin 0 0 0 0 .
|
.Fn newwin 0 0 0 0 .
|
||||||
.Ds
|
.Ds
|
||||||
.Fn nl "" \(dg
|
.Fn nl ""
|
||||||
.De
|
.De
|
||||||
Set the terminal to nl mode,
|
Set the terminal to nl mode,
|
||||||
.i i.e. ,
|
.i i.e. ,
|
||||||
|
@ -1145,7 +1145,7 @@ so it is recommended, but not required, to turn it off.
|
||||||
.De
|
.De
|
||||||
Return attributes that cannot be combined with color.
|
Return attributes that cannot be combined with color.
|
||||||
.Ds
|
.Ds
|
||||||
.Fn nocbreak "" \(dg
|
.Fn nocbreak ""
|
||||||
.De
|
.De
|
||||||
Unset the terminal from cbreak mode.
|
Unset the terminal from cbreak mode.
|
||||||
.Ds
|
.Ds
|
||||||
|
@ -1176,19 +1176,19 @@ to block indefinitely. See also
|
||||||
.De
|
.De
|
||||||
Turn echoing of characters off.
|
Turn echoing of characters off.
|
||||||
.Ds
|
.Ds
|
||||||
.Fn nonl "" \(dg
|
.Fn nonl ""
|
||||||
.De
|
.De
|
||||||
Unset the terminal to from nl mode. See
|
Unset the terminal to from nl mode. See
|
||||||
.Fn nl .
|
.Fn nl .
|
||||||
.ne 1i
|
.ne 1i
|
||||||
.Ds
|
.Ds
|
||||||
.Fn noqiflush
|
.Fn noqiflush \(dg
|
||||||
.De
|
.De
|
||||||
Unset the terminal flush on interrupt mode.
|
Unset the terminal flush on interrupt mode.
|
||||||
This is equivalent to
|
This is equivalent to
|
||||||
.Fn intrflush stdscr FALSE .
|
.Fn intrflush stdscr FALSE .
|
||||||
.Ds
|
.Ds
|
||||||
.Fn noraw "" \(dg
|
.Fn noraw ""
|
||||||
.De
|
.De
|
||||||
Unset the terminal from raw mode. See
|
Unset the terminal from raw mode. See
|
||||||
.Fn raw .
|
.Fn raw .
|
||||||
|
@ -1280,13 +1280,13 @@ It is often advisable to use the field width options of
|
||||||
to avoid leaving things on the window from earlier calls.
|
to avoid leaving things on the window from earlier calls.
|
||||||
\*(Es
|
\*(Es
|
||||||
.Ds
|
.Ds
|
||||||
.Fn qiflush
|
.Fn qiflush \(dg
|
||||||
.De
|
.De
|
||||||
Set the terminal flush on interrupt mode.
|
Set the terminal flush on interrupt mode.
|
||||||
This is equivalent to
|
This is equivalent to
|
||||||
.Fn intrflush stdscr TRUE .
|
.Fn intrflush stdscr TRUE .
|
||||||
.Ds
|
.Ds
|
||||||
.Fn raw "" \(dg
|
.Fn raw ""
|
||||||
.De
|
.De
|
||||||
Set the terminal to raw mode.
|
Set the terminal to raw mode.
|
||||||
On version 7
|
On version 7
|
||||||
|
@ -1300,6 +1300,13 @@ this also turns off newline mapping
|
||||||
(see
|
(see
|
||||||
.Fn nl ).
|
.Fn nl ).
|
||||||
.Ds
|
.Ds
|
||||||
|
.Fn redrawwin "WINDOW *win" \(dg
|
||||||
|
.De
|
||||||
|
Mark the entire window as having been corrupted.
|
||||||
|
This is equivalent to the
|
||||||
|
.Fn touchwin
|
||||||
|
function.
|
||||||
|
.Ds
|
||||||
.Fn refresh "" \(dg
|
.Fn refresh "" \(dg
|
||||||
.De
|
.De
|
||||||
Synchronize the terminal screen with the desired window.
|
Synchronize the terminal screen with the desired window.
|
||||||
|
@ -1628,6 +1635,16 @@ before a call to
|
||||||
.Fn doupdate ,
|
.Fn doupdate ,
|
||||||
thus allowing the screen to updated in an efficient manner.
|
thus allowing the screen to updated in an efficient manner.
|
||||||
.Ds
|
.Ds
|
||||||
|
.Fn wredrawln "WINDOW *win" "int line" "int n" \(dg
|
||||||
|
.De
|
||||||
|
Mark
|
||||||
|
.Vn n
|
||||||
|
lines starting at
|
||||||
|
.Vn line
|
||||||
|
in the window as corrupted.
|
||||||
|
This is equivalent to
|
||||||
|
.Fn wtouchln "win" "line" "n" "1" .
|
||||||
|
.Ds
|
||||||
.Fn wresize "WINDOW *win" "int lines" "int columns"
|
.Fn wresize "WINDOW *win" "int lines" "int columns"
|
||||||
.De
|
.De
|
||||||
Resize the specified window to the given dimensions. The window will be
|
Resize the specified window to the given dimensions. The window will be
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: curses.3,v 1.51 2003/08/07 16:44:20 agc Exp $
|
.\" $NetBSD: curses.3,v 1.52 2003/10/05 10:13:02 jdc Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 1985, 1991, 1993
|
.\" Copyright (c) 1985, 1991, 1993
|
||||||
.\" The Regents of the University of California. All rights reserved.
|
.\" The Regents of the University of California. All rights reserved.
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
.\"
|
.\"
|
||||||
.\" @(#)curses.3 8.1 (Berkeley) 6/4/93
|
.\" @(#)curses.3 8.1 (Berkeley) 6/4/93
|
||||||
.\"
|
.\"
|
||||||
.Dd May 21, 2003
|
.Dd September 23, 2003
|
||||||
.Dt CURSES 3
|
.Dt CURSES 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -212,6 +212,7 @@ must be called before any of the other routines that deal with color are used.
|
||||||
.It printw Ta Xr curses_print 3
|
.It printw Ta Xr curses_print 3
|
||||||
.It qiflush Ta Xr curses_tty 3
|
.It qiflush Ta Xr curses_tty 3
|
||||||
.It raw Ta Xr curses_tty 3
|
.It raw Ta Xr curses_tty 3
|
||||||
|
.It redrawwin Ta Xr curses_touch 3
|
||||||
.It refresh Ta Xr curses_refresh 3
|
.It refresh Ta Xr curses_refresh 3
|
||||||
.It reset_prog_mode Ta Xr curses_tty 3
|
.It reset_prog_mode Ta Xr curses_tty 3
|
||||||
.It reset_shell_mode Ta Xr curses_tty 3
|
.It reset_shell_mode Ta Xr curses_tty 3
|
||||||
|
@ -278,6 +279,7 @@ must be called before any of the other routines that deal with color are used.
|
||||||
.It wmove Ta Xr curses_cursor 3
|
.It wmove Ta Xr curses_cursor 3
|
||||||
.It wnoutrefresh Ta Xr curses_refresh 3
|
.It wnoutrefresh Ta Xr curses_refresh 3
|
||||||
.It wprintw Ta Xr curses_print 3
|
.It wprintw Ta Xr curses_print 3
|
||||||
|
.It wredrawln Ta Xr curses_touch 3
|
||||||
.It wrefresh Ta Xr curses_refresh 3
|
.It wrefresh Ta Xr curses_refresh 3
|
||||||
.It wresize Ta Xr curses_window 3
|
.It wresize Ta Xr curses_window 3
|
||||||
.It wscanw Ta Xr curses_scanw 3
|
.It wscanw Ta Xr curses_scanw 3
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: curses.h,v 1.78 2003/08/07 16:44:20 agc Exp $ */
|
/* $NetBSD: curses.h,v 1.79 2003/10/05 10:13:02 jdc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1981, 1993, 1994
|
* Copyright (c) 1981, 1993, 1994
|
||||||
|
@ -611,6 +611,7 @@ int printw(const char *, ...)
|
||||||
__attribute__((__format__(__printf__, 1, 2)));
|
__attribute__((__format__(__printf__, 1, 2)));
|
||||||
void qiflush(void);
|
void qiflush(void);
|
||||||
int raw(void);
|
int raw(void);
|
||||||
|
int redrawwin(WINDOW *);
|
||||||
int reset_prog_mode(void);
|
int reset_prog_mode(void);
|
||||||
int reset_shell_mode(void);
|
int reset_shell_mode(void);
|
||||||
int resetty(void);
|
int resetty(void);
|
||||||
|
@ -674,6 +675,7 @@ int wmove(WINDOW *, int, int);
|
||||||
int wnoutrefresh(WINDOW *);
|
int wnoutrefresh(WINDOW *);
|
||||||
int wprintw(WINDOW *, const char *, ...)
|
int wprintw(WINDOW *, const char *, ...)
|
||||||
__attribute__((__format__(__printf__, 2, 3)));
|
__attribute__((__format__(__printf__, 2, 3)));
|
||||||
|
int wredrawln(WINDOW *, int, int);
|
||||||
int wrefresh(WINDOW *);
|
int wrefresh(WINDOW *);
|
||||||
int wresize(WINDOW *, int, int);
|
int wresize(WINDOW *, int, int);
|
||||||
int wscanw(WINDOW *, const char *, ...)
|
int wscanw(WINDOW *, const char *, ...)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
.\" $NetBSD: curses_touch.3,v 1.3 2003/04/16 13:35:01 wiz Exp $
|
.\" $NetBSD: curses_touch.3,v 1.4 2003/10/05 10:13:02 jdc Exp $
|
||||||
.\"
|
.\"
|
||||||
.\" Copyright (c) 2002
|
.\" Copyright (c) 2002
|
||||||
.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
|
.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au)
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
.\" SUCH DAMAGE.
|
.\" SUCH DAMAGE.
|
||||||
.\"
|
.\"
|
||||||
.\"
|
.\"
|
||||||
.Dd August 12, 2002
|
.Dd September 23, 2003
|
||||||
.Dt CURSES_TOUCH 3
|
.Dt CURSES_TOUCH 3
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
|
@ -41,7 +41,9 @@
|
||||||
.Nm untouchwin ,
|
.Nm untouchwin ,
|
||||||
.Nm wtouchln ,
|
.Nm wtouchln ,
|
||||||
.Nm is_linetouched ,
|
.Nm is_linetouched ,
|
||||||
.Nm is_wintouched
|
.Nm is_wintouched ,
|
||||||
|
.Nm redrawwin ,
|
||||||
|
.Nm wredrawln
|
||||||
.Nd curses window modification routines
|
.Nd curses window modification routines
|
||||||
.Sh LIBRARY
|
.Sh LIBRARY
|
||||||
.Lb libcurses
|
.Lb libcurses
|
||||||
|
@ -61,6 +63,10 @@
|
||||||
.Fn is_linetouched "WINDOW *win" "int line"
|
.Fn is_linetouched "WINDOW *win" "int line"
|
||||||
.Ft bool
|
.Ft bool
|
||||||
.Fn is_wintouched "WINDOW *win"
|
.Fn is_wintouched "WINDOW *win"
|
||||||
|
.Ft int
|
||||||
|
.Fn redrawwin "WINDOW *win"
|
||||||
|
.Ft int
|
||||||
|
.Fn wredrawln "WINDOW *win" "int line" "int n"
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
These functions mark lines and windows as modified and check the modification
|
These functions mark lines and windows as modified and check the modification
|
||||||
status of lines and windows.
|
status of lines and windows.
|
||||||
|
@ -134,6 +140,25 @@ if the window
|
||||||
has been modified since the last refresh, otherwise
|
has been modified since the last refresh, otherwise
|
||||||
.Dv FALSE
|
.Dv FALSE
|
||||||
is returned.
|
is returned.
|
||||||
|
.Pp
|
||||||
|
The
|
||||||
|
.Fn redrawwin
|
||||||
|
function marks the entire window
|
||||||
|
.Fa win
|
||||||
|
as having been corrupted.
|
||||||
|
Is is equivalent to the
|
||||||
|
.Fn touchwin
|
||||||
|
function.
|
||||||
|
.Pp
|
||||||
|
The
|
||||||
|
.Fn wredrawln
|
||||||
|
function marks
|
||||||
|
.Fa n
|
||||||
|
lines starting at
|
||||||
|
.Fa line
|
||||||
|
in the given window as corrupted.
|
||||||
|
It is equivalent to
|
||||||
|
.Fn wtouchln win line n 1 .
|
||||||
.Sh RETURN VALUES
|
.Sh RETURN VALUES
|
||||||
Functions returning pointers will return
|
Functions returning pointers will return
|
||||||
.Dv NULL
|
.Dv NULL
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $NetBSD: touchwin.c,v 1.19 2003/08/07 16:44:24 agc Exp $ */
|
/* $NetBSD: touchwin.c,v 1.20 2003/10/05 10:13:03 jdc Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1981, 1993, 1994
|
* Copyright (c) 1981, 1993, 1994
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)touchwin.c 8.2 (Berkeley) 5/4/94";
|
static char sccsid[] = "@(#)touchwin.c 8.2 (Berkeley) 5/4/94";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: touchwin.c,v 1.19 2003/08/07 16:44:24 agc Exp $");
|
__RCSID("$NetBSD: touchwin.c,v 1.20 2003/10/05 10:13:03 jdc Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
|
@ -54,18 +54,30 @@ is_linetouched(WINDOW *win, int line)
|
||||||
return ((win->lines[line]->flags & __ISDIRTY) != 0);
|
return ((win->lines[line]->flags & __ISDIRTY) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
* touchline --
|
||||||
* Touch count lines starting at start. This is the SUS v2 compliant
|
* Touch count lines starting at start. This is the SUS v2 compliant
|
||||||
* version.
|
* version.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
touchline(WINDOW *win, int start, int count)
|
touchline(WINDOW *win, int start, int count)
|
||||||
{
|
{
|
||||||
return wtouchln(win, start, count, 1);
|
return wtouchln(win, start, count, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* wredrawln --
|
||||||
|
* Mark count lines starting at start as corrupted. Implemented using
|
||||||
|
* wtouchln().
|
||||||
|
*/
|
||||||
|
int wredrawln(WINDOW *win, int start, int count)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
__CTRACE("wredrawln: (%p, %d, %d)\n", win, start, count);
|
||||||
|
#endif
|
||||||
|
return wtouchln(win, start, count, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* is_wintouched --
|
* is_wintouched --
|
||||||
* Check if the window has been touched.
|
* Check if the window has been touched.
|
||||||
|
@ -97,6 +109,19 @@ touchwin(WINDOW *win)
|
||||||
return wtouchln(win, 0, win->maxy, 1);
|
return wtouchln(win, 0, win->maxy, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* redrawwin --
|
||||||
|
* Mark entire window as corrupted. Implemented using wtouchln().
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
redrawwin(WINDOW *win)
|
||||||
|
{
|
||||||
|
#ifdef DEBUG
|
||||||
|
__CTRACE("redrawwin: (%p)\n", win);
|
||||||
|
#endif
|
||||||
|
return wtouchln(win, 0, win->maxy, 1);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* untouchwin --
|
* untouchwin --
|
||||||
* Make it look like the window has not been changed.
|
* Make it look like the window has not been changed.
|
||||||
|
|
Loading…
Reference in New Issue