Manual Page Result
0
Command: prefresh | Section: 3 | Source: Digital UNIX | File: prefresh.3.gz
curs_pad(3) Library Functions Manual curs_pad(3)
NAME
curs_pad, newpad, pechochar, pecho_wchar, pechowchar, pnoutrefresh,
prefresh, subpad - Routines that create and display Curses pads
LIBRARY
Curses Library (libcurses.a, libcurses.so)
SYNOPSIS
#include <curses.h>
WINDOW *newpad(int nlines, int ncols); int pechochar(WINDOW *pad,
chtype ch); int pecho_wchar(WINDOW *pad, const cchar_t *wch); int pe-
chowchar(WINDOW *pad, chtype wch); int pnoutrefresh(WINDOW *pad, int
pminrow,
int pmincol, int sminrow, int smincol,
int smaxrow, int smaxcol); int prefresh(WINDOW *pad, int pmin-
row,
int pmincol, int sminrow, int smincol,
int smaxrow, int smaxcol); WINDOW *subpad(WINDOW *orig, int
nlines,
int ncols, int begin_y, int begin_x);
STANDARDS
Interfaces documented on this reference page conform to industry stan-
dards as follows:
newpad, pnoutrefresh, prefresh: XPG4, XPG4-UNIX
pechochar, pecho_wchar, subpad: XPG4-UNIX
Refer to the standards(5) reference page for more information about in-
dustry standards and associated tags.
DESCRIPTION
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. Auto-
matic refreshes of pads (for example, from scrolling or echoing of in-
put) 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 ap-
plications use subpad to create a specialized window within a pad, they
often have to call touchwin or touchline on the orig window before
calling prefresh.
The prefresh and pnoutrefresh routines are analogous to wrefresh and
wnoutrefresh except that prefresh and pnoutrefresh relate to pads in-
stead 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 para-
meters specify the edges of the rectangle to be displayed on the
screen. The lower right-hand corner of the rectangle to be displayed
in the pad is calculated from the screen coordinates, since the rectan-
gles must be the same size. Both rectangles must be entirely contained
within their respective structures. Negative values of pminrow, pmin-
col, 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.
[Digital] 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 pre-
fresh.
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 char-
acters, applications may realize a considerable performance gain by us-
ing these routines instead of their equivalents. For pechowchar and pe-
cho_wchar, the last location of the pad on the screen is reused for ar-
guments to prefresh.
NOTES
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 compati-
bility reasons. Digital recommends the use of the pecho_wchar function
in new applications.
RETURN VALUES
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.
RELATED INFORMATION
Functions: curses(3), curs_addch(3), curs_addwch(3), curs_refresh(3),
curs_touch(3)
Others: standards(5) delim off
curs_pad(3)