curs_pad, newpad, pechochar, pecho_wchar, pechowchar,
pnoutrefresh, prefresh, subpad - Routines that create and
display Curses pads
int ncols ); int pechochar(
chtype ch ); int pecho_wchar(
const cchar_t *wch ); int pechowchar(
chtype wch ); int pnoutrefresh(
int smaxcol ); int prefresh(
int smaxcol ); WINDOW *subpad(
int begin_x );
Curses Library (libcurses)
Interfaces documented on this reference page conform to
industry standards as follows:
newpad, pechochar, pecho_wchar, pnoutrefresh, prefresh,
Refer to the standards(5) reference page for more information
about industry standards and associated tags.
The newpad routine creates and returns a pointer to a new
pad data structure with the given number of lines, nlines,
and columns, ncols. A pad is like a window, except that a
pad is not necessarily associated with a viewable part of
the screen. Applications should use a pad whenever they
require a window larger than the terminal screen. Automatic
refreshes of pads (for example, from scrolling or
echoing of input) do not occur. Applications cannot call
wrefresh with a pad as an argument; they must call prefresh
or pnoutrefresh instead. Note that these routines
require additional parameters to specify the part of the
pad to be displayed and the location on the screen to be
used for the display.
Using the specified number of lines, nlines, and columns,
ncols, the subpad routine creates and returns a pointer to
a specialized window (called a subpad) within a pad
(called the parent pad). The subwin routine uses screen
coordinates to create a subwindow; however, for subpad,
the subpad is created at position (begin_x, begin_y) on
the parent pad. A subpad must fit totally within its parent
pad. Changes made made to either the parent pad or the
subpad affect both. When applications use subpad to create
a specialized window within a pad, they often have to call
touchwin or touchline on the orig window before calling
The prefresh and pnoutrefresh routines are analogous to
wrefresh and wnoutrefresh except that prefresh and
pnoutrefresh relate to pads instead of windows. The additional
parameters in these routines indicate what part of
the pad and screen are involved. The pminrow and pmincol
parameters specify the upper left-hand corner of the rectangle
to be displayed in the pad. The sminrow, smincol,
smaxrow, and smaxcol parameters specify the edges of the
rectangle to be displayed on the screen. The lower righthand
corner of the rectangle to be displayed in the pad is
calculated from the screen coordinates, since the rectangles
must be the same size. Both rectangles must be
entirely contained within their respective structures.
Negative values of pminrow, pmincol, sminrow, or smincol
are treated as if they were zero.
The pechochar routine is functionally equivalent to a call
to addch followed by a call to refresh, a call to waddch
followed by a call to wrefresh, or a call to waddch followed
by a call to prefresh.
[Tru64 UNIX] The pechowchar routine is functionally
equivalent to a call to addwch followed by a call to
refresh, a call to waddwch followed by a call to wrefresh,
or a call to waddwch followed by a call to prefresh.
The pecho_wchar function outputs one character to a pad
and immediately refreshes the pad. It is equivalent to a
call to wadd_wch followed by a call to prefresh.
The pecho* routines take into consideration the fact that
only a single character is being output and, for characters
other than control characters, applications may realize
a considerable performance gain by using these routines
instead of their equivalents. For pechowchar and
pecho_wchar, the last location of the pad on the screen is
reused for arguments to prefresh.
The header file <curses.h> automatically includes the
header file <stdio.h>.
The pechowchar routine described on this reference page is
among the MNLS Curses functions that are not included in
the X/Open Curses CAE specification. MNLS routines are
supported only for backward compatibility reasons. Use the
pecho_wchar function in new applications.
Routines that return an integer return ERR upon failure
and an integer value other than ERR upon successful completion.
Routines that return pointers return NULL on error.
Functions: curses(3), curs_addch(3), curs_addwch(3),
[ Back ]